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

Side by Side Diff: tools/perf/benchmarks/session_restore.py

Issue 1126443002: Move user_story.user_story_set to story.story_set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 months 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 unified diff | Download patch
« no previous file with comments | « tools/perf/benchmarks/repaint.py ('k') | tools/telemetry/telemetry/benchmark.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import tempfile 6 import tempfile
7 7
8 from core import perf_benchmark 8 from core import perf_benchmark
9 9
10 from measurements import session_restore 10 from measurements import session_restore
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 new_args.output_dir = output_dir 49 new_args.output_dir = output_dir
50 profile_generator.GenerateProfiles( 50 profile_generator.GenerateProfiles(
51 small_profile_extender.SmallProfileExtender, 51 small_profile_extender.SmallProfileExtender,
52 profile_type, new_args) 52 profile_type, new_args)
53 args.browser_options.profile_dir = profile_dir 53 args.browser_options.profile_dir = profile_dir
54 54
55 @classmethod 55 @classmethod
56 def ValueCanBeAddedPredicate(cls, _, is_first_result): 56 def ValueCanBeAddedPredicate(cls, _, is_first_result):
57 return cls.tag == 'cold' or not is_first_result 57 return cls.tag == 'cold' or not is_first_result
58 58
59 def CreateUserStorySet(self, _): 59 def CreateStorySet(self, _):
60 """Return a user story set that only has the first user story. 60 """Return a story set that only has the first user story.
61 61
62 The session restore measurement skips the navigation step and 62 The session restore measurement skips the navigation step and
63 only tests session restore by having the browser start-up. 63 only tests session restore by having the browser start-up.
64 The first user story is used to get WPR set up and hold results. 64 The first user story is used to get WPR set up and hold results.
65 """ 65 """
66 user_story_set = self.page_set() 66 story_set = self.page_set()
67 for user_story in user_story_set.user_stories[1:]: 67 for user_story in story_set.user_stories[1:]:
68 user_story_set.RemoveUserStory(user_story) 68 story_set.RemoveUserStory(user_story)
69 return user_story_set 69 return story_set
70 70
71 def CreatePageTest(self, options): 71 def CreatePageTest(self, options):
72 is_cold = (self.tag == 'cold') 72 is_cold = (self.tag == 'cold')
73 return session_restore.SessionRestore(cold=is_cold) 73 return session_restore.SessionRestore(cold=is_cold)
74 74
75 def CreatePageSet(self, options): 75 def CreatePageSet(self, options):
76 return page_sets.Typical25PageSet(run_no_page_interactions=True) 76 return page_sets.Typical25PageSet(run_no_page_interactions=True)
77 77
78 # crbug.com/325479, crbug.com/381990 78 # crbug.com/325479, crbug.com/381990
79 @benchmark.Disabled('android', 'linux', 'reference') 79 @benchmark.Disabled('android', 'linux', 'reference')
(...skipping 14 matching lines...) Expand all
94 94
95 The first result is discarded. 95 The first result is discarded.
96 """ 96 """
97 tag = 'warm' 97 tag = 'warm'
98 options = {'pageset_repeat': 20} 98 options = {'pageset_repeat': 20}
99 99
100 @classmethod 100 @classmethod
101 def Name(cls): 101 def Name(cls):
102 return 'session_restore.warm.typical_25' 102 return 'session_restore.warm.typical_25'
103 103
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/repaint.py ('k') | tools/telemetry/telemetry/benchmark.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698