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

Print report during profiling #105

Open
mehboobali98 opened this issue Feb 10, 2022 · 3 comments
Open

Print report during profiling #105

mehboobali98 opened this issue Feb 10, 2022 · 3 comments

Comments

@mehboobali98
Copy link

Is it possible to print the report while memory profiling is being done?

P.S. The program I wish to profile would take about an hour to run. I'd like to see the memory it is using while executing.

@fatkodima
Copy link
Contributor

The report is printed only when the memory profiling is done.
You may try to trap SIGINT (fired when you press ctrl-c) and print the report here. After every press it will print more and more complete report (no reset of the state is done when generating report).

@fatkodima
Copy link
Contributor

Another solution is, again, listen to some signals and then fork a separate process, that will calculate the memory profile, while the main process continues to run (similar to how redis does snapshots).

@SamSaffron Do you think this feature is worthwhile investigation?

@SamSaffron
Copy link
Owner

I think it is an interesting project, I don't want to complicate stuff too much too much, we need to be mindful.

Open to experimentation.

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

No branches or pull requests

3 participants