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

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

Issue 1231643002: [Startup Tracing][Telemetry] Move tracing_options and tracing_category_filter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 telemetry.core.platform import tracing_category_filter
6 from telemetry.core.platform import tracing_options
7 from telemetry.page import page_test 5 from telemetry.page import page_test
8 from telemetry.timeline.model import TimelineModel 6 from telemetry.timeline.model import TimelineModel
7 from telemetry.timeline import tracing_category_filter
8 from telemetry.timeline import tracing_options
9 from telemetry.util import statistics 9 from telemetry.util import statistics
10 from telemetry.value import scalar 10 from telemetry.value import scalar
11 11
12 12
13 class TaskExecutionTime(page_test.PageTest): 13 class TaskExecutionTime(page_test.PageTest):
14 14
15 IDLE_SECTION_TRIGGER = 'SingleThreadIdleTaskRunner::RunTask' 15 IDLE_SECTION_TRIGGER = 'SingleThreadIdleTaskRunner::RunTask'
16 IDLE_SECTION = 'IDLE' 16 IDLE_SECTION = 'IDLE'
17 NORMAL_SECTION = 'NORMAL' 17 NORMAL_SECTION = 'NORMAL'
18 18
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 def AddTask(self, name, duration): 220 def AddTask(self, name, duration):
221 if name in self.tasks: 221 if name in self.tasks:
222 # section_tasks already contains an entry for this (e.g. from an earlier 222 # section_tasks already contains an entry for this (e.g. from an earlier
223 # slice), add the new duration so we can calculate a median value later. 223 # slice), add the new duration so we can calculate a median value later.
224 self.tasks[name].Update(duration) 224 self.tasks[name].Update(duration)
225 else: 225 else:
226 # This is a new task so create a new entry for it. 226 # This is a new task so create a new entry for it.
227 self.tasks[name] = NameAndDurations(name, duration) 227 self.tasks[name] = NameAndDurations(name, duration)
228 # Accumulate total duration for all tasks in this section. 228 # Accumulate total duration for all tasks in this section.
229 self.total_duration += duration 229 self.total_duration += duration
OLDNEW
« no previous file with comments | « tools/perf/measurements/smoothness_controller.py ('k') | tools/perf/measurements/thread_times.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698