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

Side by Side Diff: tools/perf/measurements/task_execution_time.py

Issue 1917393002: [tools/perf] Reference legacy_page_test module instead of page_test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « tools/perf/measurements/tab_switching.py ('k') | tools/perf/measurements/thread_times.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 telemetry.page import page_test 5 from telemetry.page import legacy_page_test
6 from telemetry.timeline.model import TimelineModel 6 from telemetry.timeline.model import TimelineModel
7 from telemetry.timeline import tracing_config 7 from telemetry.timeline import tracing_config
8 from telemetry.util import statistics 8 from telemetry.util import statistics
9 from telemetry.value import scalar 9 from telemetry.value import scalar
10 10
11 11
12 class TaskExecutionTime(page_test.PageTest): 12 class TaskExecutionTime(legacy_page_test.LegacyPageTest):
13 13
14 IDLE_SECTION_TRIGGER = 'SingleThreadIdleTaskRunner::RunTask' 14 IDLE_SECTION_TRIGGER = 'SingleThreadIdleTaskRunner::RunTask'
15 IDLE_SECTION = 'IDLE' 15 IDLE_SECTION = 'IDLE'
16 NORMAL_SECTION = 'NORMAL' 16 NORMAL_SECTION = 'NORMAL'
17 17
18 _TIME_OUT_IN_SECONDS = 60 18 _TIME_OUT_IN_SECONDS = 60
19 _NUMBER_OF_RESULTS_TO_DISPLAY = 10 19 _NUMBER_OF_RESULTS_TO_DISPLAY = 10
20 _BROWSER_THREADS = ['Chrome_ChildIOThread', 20 _BROWSER_THREADS = ['Chrome_ChildIOThread',
21 'Chrome_IOThread'] 21 'Chrome_IOThread']
22 _RENDERER_THREADS = ['Chrome_ChildIOThread', 22 _RENDERER_THREADS = ['Chrome_ChildIOThread',
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 def AddTask(self, name, duration): 216 def AddTask(self, name, duration):
217 if name in self.tasks: 217 if name in self.tasks:
218 # section_tasks already contains an entry for this (e.g. from an earlier 218 # section_tasks already contains an entry for this (e.g. from an earlier
219 # slice), add the new duration so we can calculate a median value later. 219 # slice), add the new duration so we can calculate a median value later.
220 self.tasks[name].Update(duration) 220 self.tasks[name].Update(duration)
221 else: 221 else:
222 # This is a new task so create a new entry for it. 222 # This is a new task so create a new entry for it.
223 self.tasks[name] = NameAndDurations(name, duration) 223 self.tasks[name] = NameAndDurations(name, duration)
224 # Accumulate total duration for all tasks in this section. 224 # Accumulate total duration for all tasks in this section.
225 self.total_duration += duration 225 self.total_duration += duration
OLDNEW
« no previous file with comments | « tools/perf/measurements/tab_switching.py ('k') | tools/perf/measurements/thread_times.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698