a python trace profiler that outputs to chrome trace-viewer format (about://tracing).
from pytracing import TraceProfiler tp = TraceProfiler(output=open('/tmp/trace.out', 'wb')) with tp.traced(): ...execute something here...