-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: main
Are you sure you want to change the base?
Conversation
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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?
Refactor code structure