mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
8fa8951896
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.
19 lines
358 B
Python
19 lines
358 B
Python
import sys
|
|
import os
|
|
path = os.path.dirname(os.path.realpath(__file__))
|
|
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')
|