vmprof / vmprof-python

vmprof - a statistical program profiler
http://vmprof.com
Other
433 stars 54 forks source link

Recorded profile end time is too late, making it hard to timestamp each sample #233

Open oremanj opened 3 years ago

oremanj commented 3 years ago

vmprof.disable() stops sampling, then does an expensive scan of code objects and debug info to symbolize addresses, then fsync()'s the profile, and only then records the end timestamp. In my experience this results in an end timestamp that's between 80 and 500 milliseconds after the sampling actually stopped, which interferes with efforts to match up vmprof-recorded stacks against other sources of profiling information.

Could the end time recorded in the profile be made to more closely match the time at which sampling last stopped?

fijal commented 3 years ago

Hi

That does make sense. Never thought about it. Feel free to issue a pull request to fix that