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

Side by Side Diff: tools/perf/page_sets/typical_25.py

Issue 2933173002: Deleting unused story sets (Closed)
Patch Set: Deleting unused story sets Created 3 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/page_sets/typical_10_mobile.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 shutil
6
7 from profile_creators import profile_generator
8 from telemetry.page import page as page_module 5 from telemetry.page import page as page_module
9 from telemetry.page import cache_temperature as cache_temperature_module 6 from telemetry.page import cache_temperature as cache_temperature_module
10 from telemetry.page import shared_page_state 7 from telemetry.page import shared_page_state
11 from telemetry import story 8 from telemetry import story
12 9
13 10
14 class Typical25ProfileSharedState(shared_page_state.SharedDesktopPageState):
15 """Shared state associated with a profile generated from 25 navigations.
16
17 Generates a shared profile on initialization.
18 """
19
20 def __init__(self, test, finder_options, story_set):
21 super(Typical25ProfileSharedState, self).__init__(
22 test, finder_options, story_set)
23 from profile_creators import small_profile_extender
24 generator = profile_generator.ProfileGenerator(
25 small_profile_extender.SmallProfileExtender,
26 'small_profile')
27 self._out_dir, self._owns_out_dir = generator.Run(finder_options)
28 if self._out_dir:
29 finder_options.browser_options.profile_dir = self._out_dir
30 else:
31 finder_options.browser_options.dont_override_profile = True
32
33 def TearDownState(self):
34 """Clean up generated profile directory."""
35 super(Typical25ProfileSharedState, self).TearDownState()
36 if self._owns_out_dir:
37 shutil.rmtree(self._out_dir)
38
39
40 class Typical25Page(page_module.Page): 11 class Typical25Page(page_module.Page):
41 12
42 def __init__(self, url, page_set, run_no_page_interactions, 13 def __init__(self, url, page_set, run_no_page_interactions,
43 shared_page_state_class=shared_page_state.SharedDesktopPageState, 14 shared_page_state_class=shared_page_state.SharedDesktopPageState,
44 cache_temperature=None): 15 cache_temperature=None):
45 super(Typical25Page, self).__init__( 16 super(Typical25Page, self).__init__(
46 url=url, page_set=page_set, 17 url=url, page_set=page_set,
47 shared_page_state_class=shared_page_state_class, 18 shared_page_state_class=shared_page_state_class,
48 cache_temperature=cache_temperature) 19 cache_temperature=cache_temperature)
49 self._run_no_page_interactions = run_no_page_interactions 20 self._run_no_page_interactions = run_no_page_interactions
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 'http://www.airbnb.com/', 76 'http://www.airbnb.com/',
106 'http://www.ign.com/', 77 'http://www.ign.com/',
107 # Why: Alexa health #25 78 # Why: Alexa health #25
108 'http://www.fda.gov', 79 'http://www.fda.gov',
109 ] 80 ]
110 81
111 for url in urls_list: 82 for url in urls_list:
112 for temp in cache_temperatures: 83 for temp in cache_temperatures:
113 self.AddStory(page_class( 84 self.AddStory(page_class(
114 url, self, run_no_page_interactions, cache_temperature=temp)) 85 url, self, run_no_page_interactions, cache_temperature=temp))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/typical_10_mobile.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698