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

fix: close CPU profile #416

Merged
merged 1 commit into from
May 22, 2024
Merged

fix: close CPU profile #416

merged 1 commit into from
May 22, 2024

Conversation

testwill
Copy link
Contributor

@testwill testwill commented Apr 3, 2024

Add a description of your changes here.

How to Test

Add brief instructions on how to test your changes.

Notes & Caveats

If necessary, explain the motivation for this PR, and note any caveats that apply to your changes or future work that will be needed.

Issue Tracking

Add a link to the relevant GitHub issue(s) if the pull request resolves it.

@developStorm
Copy link
Member

Thanks for the PR! 🚀 Just a quick note: pprof.StartCPUProfile() is non-blocking, so deferring the file close right after might cut off data logging prematurely. Maybe we can close the file in stopCPUProfile() instead? That way, we ensure everything is logged properly before closing. Thoughts?

@developStorm developStorm self-requested a review May 22, 2024 05:02
Signed-off-by: guoguangwu <[email protected]>
@developStorm developStorm merged commit 6106c1a into zmap:master May 22, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants