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

Side by Side Diff: tools/perf/metrics/timeline_based_metric.py

Issue 200843002: Convert smoothness to the new timeline based metric API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « tools/perf/metrics/timeline.py ('k') | tools/perf/metrics/timeline_interaction_record.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
5 class TimelineBasedMetric(object): 6 class TimelineBasedMetric(object):
6 def __init__(self): 7 def __init__(self):
7 """Computes metrics from a telemetry.core.timeline Model and a range 8 """Computes metrics from a telemetry.core.timeline Model and a range
8 9
9 """ 10 """
10 super(TimelineBasedMetric, self).__init__() 11 super(TimelineBasedMetric, self).__init__()
11 12
12 def AddResults(self, model, renderer_thread, 13 def AddResults(self, model, renderer_thread,
13 interaction_record, results): 14 interaction_record, results):
14 """Computes and adds metrics for the interaction_record's time range. 15 """Computes and adds metrics for the interaction_record's time range.
15 16
16 The override of this method should compute results on the data **only** 17 The override of this method should compute results on the data **only**
17 within the interaction_record's start and end time. 18 within the interaction_record's start and end time.
18 19
19 model is an instance of telemetry.core.timeline.model.TimelineModel. 20 model is an instance of telemetry.core.timeline.model.TimelineModel.
20 interaction_record is an instance of TimelineInteractionRecord. 21 interaction_record is an instance of TimelineInteractionRecord.
21 results is an instance of page.PageTestResults. 22 results is an instance of page.PageTestResults.
22 23
23 """ 24 """
24 raise NotImplementedError() 25 raise NotImplementedError()
OLDNEW
« no previous file with comments | « tools/perf/metrics/timeline.py ('k') | tools/perf/metrics/timeline_interaction_record.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698