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

Unified Diff: tools/perf/page_sets/dummy_story_set.py

Issue 1410683014: [tools/perf] Add dummy benchmark that produces Gaussian value with a known mean and std (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « tools/perf/page_sets/dummy_page.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/dummy_story_set.py
diff --git a/tools/perf/page_sets/dummy_story_set.py b/tools/perf/page_sets/dummy_story_set.py
new file mode 100644
index 0000000000000000000000000000000000000000..5575468fd59874b0e693f0211aefa58e80e5d7a4
--- /dev/null
+++ b/tools/perf/page_sets/dummy_story_set.py
@@ -0,0 +1,23 @@
+# Copyright 2015 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 as page_module
+from telemetry import story
+
+
+class DummyPage(page_module.Page):
+
+ def __init__(self, page_set):
+ super(DummyPage, self).__init__(
+ url='file://dummy_page.html',
+ page_set=page_set)
+
+ def PerformPageInteractions(self, action_runner):
+ assert action_runner.EvaluateJavaScript('1 + window.__dummy_value') == 2
+
+
+class DummyStorySet(story.StorySet):
+
+ def __init__(self):
+ super(DummyStorySet, self).__init__()
+ self.AddStory(DummyPage(self))
« no previous file with comments | « tools/perf/page_sets/dummy_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698