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

Side by Side Diff: tools/perf/contrib/oilpan/oilpan_gc_times_unittest.py

Issue 2941763004: Explicitly setting names for stories in unittests (Closed)
Patch Set: Created 3 years, 6 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 from contrib.oilpan import oilpan_gc_times 5 from contrib.oilpan import oilpan_gc_times
6 6
7 from telemetry.internal.results import page_test_results 7 from telemetry.internal.results import page_test_results
8 from telemetry.page import page as page_module 8 from telemetry.page import page as page_module
9 from telemetry.testing import options_for_unittests 9 from telemetry.testing import options_for_unittests
10 from telemetry.testing import page_test_test_case 10 from telemetry.testing import page_test_test_case
11 from telemetry.timeline import model 11 from telemetry.timeline import model
12 from telemetry.timeline import slice as slice_data 12 from telemetry.timeline import slice as slice_data
13 13
14 import mock # pylint: disable=import-error 14 import mock # pylint: disable=import-error
15 15
16 16
17 class TestOilpanGCTimesPage(page_module.Page): 17 class TestOilpanGCTimesPage(page_module.Page):
18 18
19 def __init__(self, page_set): 19 def __init__(self, page_set):
20 super(TestOilpanGCTimesPage, self).__init__( 20 super(TestOilpanGCTimesPage, self).__init__(
21 'file://blank.html', page_set, page_set.base_dir) 21 'file://blank.html', page_set, page_set.base_dir, name='blank.html')
22 22
23 def RunPageInteractions(self, action_runner): 23 def RunPageInteractions(self, action_runner):
24 with action_runner.CreateGestureInteraction('ScrollAction'): 24 with action_runner.CreateGestureInteraction('ScrollAction'):
25 action_runner.ScrollPage() 25 action_runner.ScrollPage()
26 26
27 27
28 class OilpanGCTimesTestData(object): 28 class OilpanGCTimesTestData(object):
29 29
30 def __init__(self, thread_name): 30 def __init__(self, thread_name):
31 self._model = model.TimelineModel() 31 self._model = model.TimelineModel()
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 data.AddSlice(self._KEY_COMPLETE_SWEEP, 862, 42, {}) 284 data.AddSlice(self._KEY_COMPLETE_SWEEP, 862, 42, {})
285 data.AddSlice(self._KEY_MARK, 904, 43, 285 data.AddSlice(self._KEY_MARK, 904, 43,
286 {'lazySweeping': False, 'gcReason': 'IdleGC'}) 286 {'lazySweeping': False, 'gcReason': 'IdleGC'})
287 last_measure = data.AddSlice(self._KEY_COMPLETE_SWEEP, 947, 44, {}) 287 last_measure = data.AddSlice(self._KEY_COMPLETE_SWEEP, 947, 44, {})
288 288
289 # Async event 289 # Async event
290 async_dur = last_measure.end - first_measure.start 290 async_dur = last_measure.end - first_measure.start
291 data.AddAsyncSlice(self._KEY_MEASURE, first_measure.start, async_dur, {}) 291 data.AddAsyncSlice(self._KEY_MEASURE, first_measure.start, async_dur, {})
292 292
293 return data 293 return data
OLDNEW
« no previous file with comments | « tools/perf/contrib/cluster_telemetry/page_set.py ('k') | tools/perf/measurements/task_execution_time_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698