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

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: 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..6d9a8a2659b89c07200e26b2a50b8ec7e16ca34e
--- /dev/null
+++ b/tools/perf/metrics/timeline_based_metric.py
@@ -0,0 +1,19 @@
+# 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):
+ super(TimelineBasedMetric, self).__init__()
+
+ def AddResults(self, model, renderer_thread,
+ metric_request, results, detailed_mode=False):
+ """ Override to actually add metrics to the results. Metric that overrides
+ this method should only compute metric on the data between time_bound.
+
+ model is a model of timeline APIT. (TODO: make a shared timeline superclass)
+ time_bound is an instance of telemetry.core.timeline.Bounds
+ results_prefix is the name of the interval to be displayed in results.
+ results is an instance of page.PageTestResults.
+ """
+ raise NotImplementedError()

Powered by Google App Engine
This is Rietveld 408576698