Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code structure #9

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

asifgenius
Copy link

@asifgenius asifgenius commented May 10, 2024

Refactor code structure

@asifgenius asifgenius changed the title Structure Refactor code structure May 10, 2024
@asifgenius
Copy link
Author

Can you please review this pr? @lazorfuzz

src/index.js Outdated
@@ -23,7 +24,7 @@ const middleware = async (req, res, next) => {
switch (req.path) {
case heapWebPath:
try {
await heap(heapFilePath);
await heap(heapFilePath, pprof);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why pass the module as a param?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lazorfuzz Passing the pprof instance to both the heap and wall modules ensures they share the same instance, guaranteeing consistency and avoiding potential issues that may arise from using different instances of pprof.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @lazorfuzz can you review this PR and give some suggestion / feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants