Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: tools/telemetry/telemetry/core/timeline/trace_event_importer.py

Issue 149303004: [Telemetry] Fix flow event importer error checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/timeline/trace_event_importer_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/timeline/trace_event_importer.py
diff --git a/tools/telemetry/telemetry/core/timeline/trace_event_importer.py b/tools/telemetry/telemetry/core/timeline/trace_event_importer.py
index 8555b20c087e917dfed89505956724d21c55913a..6eec5775a8e9c67611921842a031af56a47e946d 100644
--- a/tools/telemetry/telemetry/core/timeline/trace_event_importer.py
+++ b/tools/telemetry/telemetry/core/timeline/trace_event_importer.py
@@ -415,18 +415,17 @@ class TraceEventTimelineImporter(importer.TimelineImporter):
if event['ph'] == 's':
if event['id'] in flow_id_to_event:
self._model.import_errors.append(
- 'event id ' + event['id'] + ' already seen when ' +
- 'encountering start of flow event.')
+ 'event id %s already seen when encountering start of'
+ 'flow event.' % event['id'])
continue
flow_id_to_event[event['id']] = flow_event
elif event['ph'] == 't' or event['ph'] == 'f':
- flow_position = flow_id_to_event[event['id']]
- if not flow_position:
+ if not event['id'] in flow_id_to_event:
self._model.import_errors.append(
- 'Found flow phase ' + event['ph'] + ' for id: ' + event['id'] +
- ' but no flow start found.')
+ 'Found flow phase %s for id: %s but no flow start found.' % (
+ event['ph'], event['id']))
continue
-
+ flow_position = flow_id_to_event[event['id']]
self._model.flow_events.append([flow_position, flow_event])
if event['ph'] == 'f':
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/timeline/trace_event_importer_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698