Commit 9deebbfc authored by Ad Schellevis's avatar Ad Schellevis

fix profiler option in configd (check_reload_status)

parent 639d0993
......@@ -80,8 +80,9 @@ if len(sys.argv) > 1 and 'console' in sys.argv[1:]:
# (https://code.google.com/p/jrfonseca/wiki/Gprof2Dot)
print ("...<ctrl><c> to stop profiling")
profile = cProfile.Profile()
profile.enable()
profile.enable(subcalls=True)
try:
proc_handler.single_threaded = True
proc_handler.run()
except KeyboardInterrupt:
pass
......
......@@ -66,7 +66,8 @@ class Handler(object):
"""
self.socket_filename = socket_filename
self.config_path = config_path
self.simulation_mode =simulation_mode
self.simulation_mode = simulation_mode
self.single_threaded = False
def run(self):
""" Run process handler
......@@ -97,7 +98,13 @@ class Handler(object):
client_address=client_address,
action_handler=actHandler,
simulation_mode=self.simulation_mode)
cmd_thread.start()
if self.single_threaded :
# run single threaded
cmd_thread.run()
else:
# rnu threaded
cmd_thread.start()
except KeyboardInterrupt:
# exit on <ctrl><c>
raise
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment