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

Unified Diff: tools/perf/metrics/timeline_based_metric.py

Issue 165673008: [telemetry] Implement first version of timeline based measurement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With feedback and naming updates Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: tools/perf/metrics/timeline_based_metric.py
diff --git a/tools/perf/metrics/timeline_based_metric.py b/tools/perf/metrics/timeline_based_metric.py
new file mode 100644
index 0000000000000000000000000000000000000000..516602b2928cb1d8474d9cf25be91ec7ff10c994
--- /dev/null
+++ b/tools/perf/metrics/timeline_based_metric.py
@@ -0,0 +1,21 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+class TimelineBasedMetric(object):
+ def __init__(self):
+ """Computes metrics from a telemetry.core.timeline Model and a range
+
+ """
+ super(TimelineBasedMetric, self).__init__()
+
+ def AddResults(self, model, renderer_thread,
+ interaction_record, results):
+ """ Override to actually add metrics to the results. Metric that overrides
+ this method should only compute metric on the data between time_bound.
nednguyen 2014/03/04 15:38:47 Compute metric on the data during interaction_reco
+
+ model is a model of timeline APIT. (TODO: make a shared timeline superclass)
+ interaction_record is an instance of TimelineInteractionRecord.
+ results is an instance of page.PageTestResults.
nednguyen 2014/03/04 15:38:47 Our plan is using a results wrapper here to make s
+ """
+ raise NotImplementedError()

Powered by Google App Engine
This is Rietveld 408576698