srlindsay / gevent-profiler

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

Full class/method names, max-width based column output, etc #2

Closed daf closed 12 years ago

daf commented 12 years ago

Using the inspect module, we pull out any self method vars in a call and record that, and then resolve which class actually defines that method via line number.

It changes the behavior slightly, in that overrides in the same module are no longer grouped together, but I found it much easier to understand, especially in summary view. The combination (as was the old behavior) is somewhat useful for stats view, but I still prefer this one.

As a result, the output is longer and less predictable, so I calculate the maximum width of each column and only output what is needed.

Also the .pyc file is removed.

srlindsay commented 12 years ago

This is much better than what I was doing. Merged!