浏览代码

profiling sort by function calls

Joseph Brandenburg 2 周之前
父节点
当前提交
6b1f58402e
共有 1 个文件被更改,包括 2 次插入 和 0 次删除
  1. 2 0
      ops_nodegroup.py

+ 2 - 0
ops_nodegroup.py

@@ -290,6 +290,8 @@ class ExecuteNodeTree(Operator):
             sortby = SortKey.TIME
             if 'cum' in environ.get("DOPROFILE").lower():
                 sortby = SortKey.CUMULATIVE
+            if "calls" in environ.get("DOPROFILE").lower():
+                sortby = SortKey.CALLS
             profile_function = environ.get("PROFILE_FUNCTION")
             printme1 = ''
             with cProfile.Profile() as pr: