srlindsay / gevent-profiler

a greenlet aware profiling module
gevent-profiler
90 stars 19 forks source link

Documentation on result analysis #6

Open edevil opened 12 years ago

edevil commented 12 years ago

I think documentation is missing on how to analyze the profiling results that are gevent specific. I would like to know if my code is gevent friendly, if it yields or gives up the processor frequently. Can we know this by looking at the profiler results?

srlindsay commented 12 years ago

Hmm... It sounds like you're looking for something different than what I originally intended the profiler for, but adding the ability to track long segments of unyielding code would be a very useful feature. The profiler is collecting this information anyway, but it's just summing up the totals for each greenlet. Finding the longest spans between greenlet switches should be pretty easy, which would go a long way towards answering that question.

For this use case, what information would be most useful for you? Possibly a distribution of execution times between yields for each function call?

edevil commented 12 years ago

Yes, that would be a big help! Thanks.