Greenlet瓶颈剖析器。
gbn的Python项目详细描述
Greenlet瓶颈剖析器。
使用“greenlet.settrace”精确测量从/切换到原始greenlet时暂停/继续计数时间。
也可以算挂钟时间。还计算步骤调用和上下文切换。
用法:
gbn_attach() gbn('step1') step1() gbn('step2') step2() wall = gbn('step3') step3() wall = gbn('step4', wall=wall) step4() gbn('step5', wall=wall) step5() gbn() does_not_count_this() log.info(gbn_report_and_reset()) # OR spawn(gbn_report_and_reset, each=60, log=log.info)
有关详细文档,请参见help(gbn)。
其他工具: