Are there any profilers that can be used on a gevent based daemon(code that loops forever)? It is not a HTTP based daemon, it is used for back end purposes. I looked at few different potential profilers for gevent based code however they all look like they run only for code that runs for a while and exits.
you can use GreenletProfiler, it provides a simple way to get detailed profiling information about a Python process that uses the gevent.
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')
Here's a link!:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With