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

Unified Diff: tools/perf/measurements/no_op.py

Issue 100933002: Add a no-op measurement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/no_op.py
diff --git a/tools/perf/measurements/no_op.py b/tools/perf/measurements/no_op.py
new file mode 100644
index 0000000000000000000000000000000000000000..148185efa3b869526637d38fbffc93e17092ad8a
--- /dev/null
+++ b/tools/perf/measurements/no_op.py
@@ -0,0 +1,21 @@
+# Copyright (c) 2013 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.
+
+from telemetry.page import page_measurement
+
+class NoOp(page_measurement.PageMeasurement):
+ def __init__(self):
+ super(NoOp, self).__init__('no_op')
+
+ def CanRunForPage(self, page):
+ return hasattr(page, 'no_op')
tonyg 2013/12/03 02:46:44 Does this prevent it from working with most page s
+
+ def WillRunAction(self, page, tab, action):
+ pass
+
+ def DidRunAction(self, page, tab, action):
tonyg 2013/12/03 02:46:44 Are Will/DidRunAction really necessary?
+ pass
+
+ def MeasurePage(self, page, tab, results):
+ pass
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698