Index: tools/perf/benchmarks/session_restore.py |
diff --git a/tools/perf/benchmarks/session_restore.py b/tools/perf/benchmarks/session_restore.py |
index 2591c0bc249876f059a4c2a0a84f7b94ec5dd3fb..2b6b2dc716b1add6732efbf617f2a75675490998 100644 |
--- a/tools/perf/benchmarks/session_restore.py |
+++ b/tools/perf/benchmarks/session_restore.py |
@@ -13,6 +13,12 @@ from telemetry.page import profile_generator |
class _SessionRestoreTest(benchmark.Benchmark): |
+ """Create a session restore test that is either "warm" or "cold". |
qyearsley
2015/01/28 19:39:08
1. Possible alternative phrasing: "Base Benchmark
slamm
2015/02/23 23:46:35
Done.
|
+ |
+ Use Typical25PageSet to match what the SmallProfileCreator uses. |
+ TODO(slamm): Make SmallProfileCreator and this use the same page_set ref. |
+ """ |
+ page_set = page_sets.Typical25PageSet |
@classmethod |
def ProcessCommandLineArgs(cls, parser, args): |
@@ -34,6 +40,18 @@ class _SessionRestoreTest(benchmark.Benchmark): |
small_profile_creator.SmallProfileCreator, profile_type, new_args) |
args.browser_options.profile_dir = profile_dir |
+ def CreateUserStorySet(self, _): |
+ """Return a user story set that only has the first user story. |
+ |
+ The session restore measurement skips the navigation step and |
+ only tests session restore by having the browser start-up. |
+ The first user story is used to get WPR set up and hold results. |
+ """ |
+ user_story_set = self.page_set() |
+ for user_story in user_story_set.user_stories[1:]: |
+ user_story_set.RemoveUserStory(user_story) |
+ return user_story_set |
+ |
def CreatePageTest(self, options): |
is_cold = (self.tag == 'cold') |
return session_restore.SessionRestore(cold=is_cold) |
@@ -42,7 +60,6 @@ class _SessionRestoreTest(benchmark.Benchmark): |
@benchmark.Disabled('android', 'linux', 'reference') |
class SessionRestoreColdTypical25(_SessionRestoreTest): |
tag = 'cold' |
- page_set = page_sets.Typical25PageSet |
options = {'pageset_repeat': 5} |
@@ -50,5 +67,4 @@ class SessionRestoreColdTypical25(_SessionRestoreTest): |
@benchmark.Disabled('android', 'linux', 'reference') |
class SessionRestoreWarmTypical25(_SessionRestoreTest): |
tag = 'warm' |
- page_set = page_sets.Typical25PageSet |
options = {'pageset_repeat': 20} |