ko/profiler JS module. Profiles are dumped to your profile folder. To open them use Cleopatra.
To record named profiles you need to set the
profilerEnabledName string pref.
To record unnamed profiles you need to first call
Profiling results are saved to the "profiler" folder within your Komodo profile folder.
For one off profiling you can use the following userscripts instead of the above:
You can profile python using cProfile
import cProfile pr = cProfile.Profile() pr.enable() # MY CODE pr.disable() pr.dump_stats('/tmp/profiledump')
This userscript will profile the next 10 seconds of execution, then save the result to /tmp/koprofile
import cProfile, signal pr = cProfile.Profile() pr.enable() def whenDone(signum, frame): pr.disable() pr.dump_stats('/tmp/koprofile') signal.signal(signal.SIGALRM, signal.SIG_DFL) signal.setitimer(signal.ITIMER_REAL, 0) signal.signal(signal.SIGALRM, whenDone) signal.setitimer(signal.ITIMER_REAL,10)
sys.pathinside Komodo to find out)
import meliae.scanner meliae.scanner.dump_all_objects("/tmp/memorydump.json")
To turn on the trace profiling, do::
This turns on the code profiler in python, and wraps all python xpcom objects in order to profile calls over xpcom. Upon shutting down Komodo, the profiler will print out a summary of the executed Python/XPCOM code.
© 2017 ActiveState Software Inc. All rights reserved. ActiveState®,
Komodo®, ActivePerl®, ActivePython®, and ActiveTcl® are registered
trademarks of ActiveState.
All other marks are property of their respective owners.