GreenletProfiler

A greenlet-aware performance profiler, suitable for analyzing Gevent applications or other Python programs that use greenlets.

GreenletProfiler.set_clock_type('cpu')
GreenletProfiler.start()
my_function()
GreenletProfiler.stop()
stats = GreenletProfiler.get_func_stats()
stats.print_all()
stats.save('profile.callgrind', type='callgrind')

GreenletProfiler is based on Yappi v0.82 and wraps its API.