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

Side by Side Diff: telemetry/telemetry/timeline/trace_event_importer_unittest.py

Issue 2736903005: [Telemetry] Move telemetry from telemetry/timeline/trace_data to tracing/trace_data (Closed)
Patch Set: fix import Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # pylint: disable=too-many-lines 5 # pylint: disable=too-many-lines
6 6
7 import unittest 7 import unittest
8 8
9 import telemetry.timeline.counter as tracing_counter 9 import telemetry.timeline.counter as tracing_counter
10 import telemetry.timeline.model as timeline_model 10 import telemetry.timeline.model as timeline_model
11 from telemetry.timeline import trace_data as trace_data_module 11 from tracing.trace_data import trace_data as trace_data_module
12 12
13 13
14 def FindEventNamed(events, name): 14 def FindEventNamed(events, name):
15 for event in events: 15 for event in events:
16 if event.name == name: 16 if event.name == name:
17 return event 17 return event
18 raise ValueError('No event found with name %s' % name) 18 raise ValueError('No event found with name %s' % name)
19 19
20 class TraceEventTimelineImporterTest(unittest.TestCase): 20 class TraceEventTimelineImporterTest(unittest.TestCase):
21 21
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 ] 1125 ]
1126 trace_data = trace_data_module.CreateTraceDataFromRawData(events) 1126 trace_data = trace_data_module.CreateTraceDataFromRawData(events)
1127 m = timeline_model.TimelineModel(trace_data) 1127 m = timeline_model.TimelineModel(trace_data)
1128 processes = m.GetAllProcesses() 1128 processes = m.GetAllProcesses()
1129 1129
1130 self.assertEqual(len(processes), len(expected)) 1130 self.assertEqual(len(processes), len(expected))
1131 for process, test_values in zip(processes, expected): 1131 for process, test_values in zip(processes, expected):
1132 process_labels, process_name = test_values 1132 process_labels, process_name = test_values
1133 self.assertEquals(process_labels, process.labels) 1133 self.assertEquals(process_labels, process.labels)
1134 self.assertEquals(process_name, process.name) 1134 self.assertEquals(process_name, process.name)
OLDNEW
« no previous file with comments | « telemetry/telemetry/timeline/trace_event_importer.py ('k') | telemetry/telemetry/value/trace.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698