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

main.run()

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')

Put comments in to hint a decent strategy to profile runtime performance
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.
