Index: tools/perf/page_sets/oortonline.py |
diff --git a/tools/perf/page_sets/oortonline.py b/tools/perf/page_sets/oortonline.py |
index bd574641cf5ff2e73ebd53eb022d0425686ecf3f..6e1f6e8a11ef7dd5504f8040ac3017385b036f2f 100644 |
--- a/tools/perf/page_sets/oortonline.py |
+++ b/tools/perf/page_sets/oortonline.py |
@@ -39,9 +39,42 @@ class OortOnlinePageSet(story.StorySet): |
URL: http://oortonline.gl/#run |
Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html |
""" |
- |
def __init__(self): |
super(OortOnlinePageSet, self).__init__( |
archive_data_file='data/oortonline.json', |
cloud_storage_bucket=story.PARTNER_BUCKET) |
self.AddStory(OortOnlinePage(self)) |
+ |
+class OortOnlineTBMPage(OortOnlinePage): |
+ def __init__(self, page_set): |
+ super(OortOnlineTBMPage, self).__init__(page_set=page_set) |
+ |
+ def RunPageInteractions(self, action_runner): |
+ WAIT_TIME_IN_SECONDS = 2 |
+ RUN_TIME_IN_SECONDS = 20 |
+ action_runner.WaitForJavaScriptCondition('window.benchmarkStarted') |
+ # Perform GC to get rid of start-up garbage. |
+ action_runner.ForceGarbageCollection() |
+ with action_runner.CreateInteraction('Begin'): |
+ action_runner.tab.browser.DumpMemory() |
+ # Skip the first few seconds to get more stable frame times. |
+ action_runner.Wait(WAIT_TIME_IN_SECONDS) |
+ with action_runner.CreateInteraction('Running'): |
+ # We cannot wait until benchmarkFinished because true because the result |
+ # screen does not update, which affects frame-time discrepancy |
+ # computation. Instead we stop based on timer. |
+ action_runner.Wait(RUN_TIME_IN_SECONDS) |
+ with action_runner.CreateInteraction('End'): |
+ action_runner.tab.browser.DumpMemory() |
+ |
+class OortOnlineTBMPageSet(story.StorySet): |
+ """Oort Online WebGL benchmark for TBM. |
+ URL: http://oortonline.gl/#run |
+ Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html |
+ """ |
+ |
+ def __init__(self): |
+ super(OortOnlineTBMPageSet, self).__init__( |
+ archive_data_file='data/oortonline.json', |
+ cloud_storage_bucket=story.PARTNER_BUCKET) |
+ self.AddStory(OortOnlineTBMPage(self)) |