From f06540e18d6a5c2eba6c15696795608db1ed260e Mon Sep 17 00:00:00 2001 From: Dmitry Trofimov Date: Wed, 13 Jul 2016 00:55:01 +0200 Subject: [PATCH] Add line counts to data model --- python/helpers/profiler/profiler.thrift | 1 + python/helpers/profiler/vmprof_profiler.py | 1 + 2 files changed, 2 insertions(+) diff --git a/python/helpers/profiler/profiler.thrift b/python/helpers/profiler/profiler.thrift index 352e95b9f829..3651c2a88320 100644 --- a/python/helpers/profiler/profiler.thrift +++ b/python/helpers/profiler/profiler.thrift @@ -23,6 +23,7 @@ struct CallTreeStat { 1: required i32 count, 2: required string name, 3: required list children, + 4: required map line_count, // number of times a line inside the frame was executed } struct TreeStats { diff --git a/python/helpers/profiler/vmprof_profiler.py b/python/helpers/profiler/vmprof_profiler.py index db0c8f475525..4567cee84887 100644 --- a/python/helpers/profiler/vmprof_profiler.py +++ b/python/helpers/profiler/vmprof_profiler.py @@ -88,6 +88,7 @@ def tree_stats_to_response(filename, response): tstats.name = node.name tstats.count = node.count tstats.children = [] + tstats.line_count = {} if parent is not None: if parent.children is None: