diff options
author | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2015-11-23 23:01:02 -0800 |
---|---|---|
committer | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2015-11-23 23:01:02 -0800 |
commit | 447c795bb8d82ec328573c6517d82dc6d0dcc0f8 (patch) | |
tree | cd6fe7da39d2f495b76c5f0d11186ba770918071 /tools | |
parent | 674b145b0304e37404cf02adbed4d7fe42ed1cbf (diff) | |
parent | d653b394714b1fa342f0872c8262c8cde5511f4b (diff) |
Merge pull request #4032 from ctiller/better-profile
Lower latency profiling
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/profiling/latency_profile/profile_analyzer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/profiling/latency_profile/profile_analyzer.py b/tools/profiling/latency_profile/profile_analyzer.py index b12e1074e5..b2a38ea60a 100755 --- a/tools/profiling/latency_profile/profile_analyzer.py +++ b/tools/profiling/latency_profile/profile_analyzer.py @@ -49,7 +49,7 @@ class ScopeBuilder(object): self.call_stack_builder.lines.append(line_item) def finish(self, line): - assert line['tag'] == self.top_line.tag, 'expected %s, got %s' % (self.top_line.tag, line['tag']) + assert line['tag'] == self.top_line.tag, 'expected %s, got %s; thread=%s; t0=%f t1=%f' % (self.top_line.tag, line['tag'], line['thd'], self.top_line.start_time, line['t']) final_time_stamp = line['t'] assert self.top_line.end_time is None self.top_line.end_time = final_time_stamp @@ -84,6 +84,7 @@ class CallStackBuilder(object): self.stk.append(ScopeBuilder(self, line)) return False elif line_type == '}': + assert self.stk, 'expected non-empty stack for closing %s; thread=%s; t=%f' % (line['tag'], line['thd'], line['t']) self.stk.pop().finish(line) if not self.stk: self.finish() |