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

Unified Diff: tools/perf/benchmarks/session_restore.py

Issue 741853002: The test attribute of a benchmark should refer to a page test class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « 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/benchmarks/session_restore.py
diff --git a/tools/perf/benchmarks/session_restore.py b/tools/perf/benchmarks/session_restore.py
index 8fd991cae66605b16e294d27fdcf8f5967c4e3b4..ff0e7660aea0d3ae680d32bc9d07115b1b4539de 100644
--- a/tools/perf/benchmarks/session_restore.py
+++ b/tools/perf/benchmarks/session_restore.py
@@ -35,12 +35,15 @@ class _SessionRestoreTest(benchmark.Benchmark):
small_profile_creator.SmallProfileCreator, profile_type, new_args)
args.browser_options.profile_dir = profile_dir
+ def CreatePageTest(self, options):
+ is_cold = (self.tag == 'cold')
+ return self.test(cold=is_cold)
# crbug.com/325479, crbug.com/381990
@benchmark.Disabled('android', 'linux', 'reference')
class SessionRestoreColdTypical25(_SessionRestoreTest):
tag = 'cold'
- test = session_restore.SessionRestore(cold=True)
+ test = session_restore.SessionRestore
page_set = page_sets.Typical25PageSet
options = {'pageset_repeat': 5}
@@ -49,7 +52,7 @@ class SessionRestoreColdTypical25(_SessionRestoreTest):
@benchmark.Disabled('android', 'linux', 'reference')
class SessionRestoreWarmTypical25(_SessionRestoreTest):
tag = 'warm'
- test = session_restore.SessionRestore(cold=False)
+ test = session_restore.SessionRestore
page_set = page_sets.Typical25PageSet
options = {'pageset_repeat': 20}
@@ -59,7 +62,7 @@ class SessionRestoreWarmTypical25(_SessionRestoreTest):
class SessionRestoreWithUrlCold(_SessionRestoreTest):
"""Measure Chrome cold session restore with startup URLs."""
tag = 'cold'
- test = session_restore_with_url.SessionRestoreWithUrl(cold=True)
+ test = session_restore_with_url.SessionRestoreWithUrl
page_set = page_sets.StartupPagesPageSet
options = {'pageset_repeat': 5}
@@ -69,6 +72,6 @@ class SessionRestoreWithUrlCold(_SessionRestoreTest):
class SessionRestoreWithUrlWarm(_SessionRestoreTest):
"""Measure Chrome warm session restore with startup URLs."""
tag = 'warm'
- test = session_restore_with_url.SessionRestoreWithUrl(cold=False)
+ test = session_restore_with_url.SessionRestoreWithUrl
page_set = page_sets.StartupPagesPageSet
options = {'pageset_repeat': 10}
« 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