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

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: update init file. Created 5 years, 7 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
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 telemetry import benchmark 8 from telemetry import benchmark
9 9
10 from measurements import session_restore 10 from measurements import session_restore
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 new_args.output_dir = output_dir 48 new_args.output_dir = output_dir
49 profile_generator.GenerateProfiles( 49 profile_generator.GenerateProfiles(
50 small_profile_extender.SmallProfileExtender, 50 small_profile_extender.SmallProfileExtender,
51 profile_type, new_args) 51 profile_type, new_args)
52 args.browser_options.profile_dir = profile_dir 52 args.browser_options.profile_dir = profile_dir
53 53
54 @classmethod 54 @classmethod
55 def ValueCanBeAddedPredicate(cls, _, is_first_result): 55 def ValueCanBeAddedPredicate(cls, _, is_first_result):
56 return cls.tag == 'cold' or not is_first_result 56 return cls.tag == 'cold' or not is_first_result
57 57
58 def CreateUserStorySet(self, _): 58 def CreateStorySet(self, _):
59 """Return a user story set that only has the first user story. 59 """Return a story set that only has the first user story.
60 60
61 The session restore measurement skips the navigation step and 61 The session restore measurement skips the navigation step and
62 only tests session restore by having the browser start-up. 62 only tests session restore by having the browser start-up.
63 The first user story is used to get WPR set up and hold results. 63 The first user story is used to get WPR set up and hold results.
64 """ 64 """
65 user_story_set = self.page_set() 65 story_set = self.page_set()
66 for user_story in user_story_set.user_stories[1:]: 66 for user_story in story_set.user_stories[1:]:
67 user_story_set.RemoveUserStory(user_story) 67 story_set.RemoveUserStory(user_story)
68 return user_story_set 68 return story_set
69 69
70 def CreatePageTest(self, options): 70 def CreatePageTest(self, options):
71 is_cold = (self.tag == 'cold') 71 is_cold = (self.tag == 'cold')
72 return session_restore.SessionRestore(cold=is_cold) 72 return session_restore.SessionRestore(cold=is_cold)
73 73
74 def CreatePageSet(self, options): 74 def CreatePageSet(self, options):
75 return page_sets.Typical25PageSet(run_no_page_interactions=True) 75 return page_sets.Typical25PageSet(run_no_page_interactions=True)
76 76
77 # crbug.com/325479, crbug.com/381990 77 # crbug.com/325479, crbug.com/381990
78 @benchmark.Disabled('android', 'linux', 'reference') 78 @benchmark.Disabled('android', 'linux', 'reference')
(...skipping 14 matching lines...) Expand all
93 93
94 The first result is discarded. 94 The first result is discarded.
95 """ 95 """
96 tag = 'warm' 96 tag = 'warm'
97 options = {'pageset_repeat': 20} 97 options = {'pageset_repeat': 20}
98 98
99 @classmethod 99 @classmethod
100 def Name(cls): 100 def Name(cls):
101 return 'session_restore.warm.typical_25' 101 return 'session_restore.warm.typical_25'
102 102
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698