2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 19:10:10 +00:00

Put comments in to hint a decent strategy to profile runtime performance

To do performance optimization in this sort of application, this is
about as well as I have been able to manage in python.  I will say perl with
NYTProf seems to be significantly better for data, but this is servicable.

I tried yappi, but it goes wildly inaccurate with this codebase.  Because of
the eventlet plumbing, cProfile is still pretty misleading.  Best strategy
seems to be review cumulative time with a healthy grain of salt around the
top items until you get down to info that makes sense.  For example, trampoline
unfairly gets a great deal of the 'blame' by taking on nearly all the activity.

internal time seems to miss a great deal of important information.
This commit is contained in:
Jarrod Johnson 2014-04-03 09:54:46 -04:00
parent e7eab2bb20
commit 8fa8951896

View File

@ -5,4 +5,14 @@ path = os.path.realpath(os.path.join(path, '..'))
sys.path.append(path)
from confluent import main
#import cProfile
#import time
#p = cProfile.Profile(time.clock)
#p.enable()
#try:
main.run()
#except:
# pass
#p.disable()
#p.print_stats(sort='cumulative')
#p.print_stats(sort='time')