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

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

Issue 2935783004: Explicitly setting names for stories in used page_sets (Closed)
Patch Set: Explicitly setting names for stories in used page_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
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 from page_sets import page_cycler_story 5 from page_sets import page_cycler_story
6 from telemetry import story 6 from telemetry import story
7 from telemetry.page import cache_temperature as cache_temperature_module 7 from telemetry.page import cache_temperature as cache_temperature_module
8 from telemetry.page import shared_page_state 8 from telemetry.page import shared_page_state
9 9
10 10
11 class IntlKoThViPage(page_cycler_story.PageCyclerStory): 11 class IntlKoThViPage(page_cycler_story.PageCyclerStory):
12 12
13 def __init__(self, url, page_set, cache_temperature=None): 13 def __init__(self, url, page_set, cache_temperature=None):
14 super(IntlKoThViPage, self).__init__( 14 super(IntlKoThViPage, self).__init__(
15 url=url, page_set=page_set, 15 url=url, page_set=page_set,
16 shared_page_state_class=shared_page_state.SharedDesktopPageState, 16 shared_page_state_class=shared_page_state.SharedDesktopPageState,
17 cache_temperature=cache_temperature) 17 cache_temperature=cache_temperature,
18 name=url)
18 19
19 20
20 class IntlKoThViPageSet(story.StorySet): 21 class IntlKoThViPageSet(story.StorySet):
21 22
22 """ Popular pages in Korean, Thai and Vietnamese. """ 23 """ Popular pages in Korean, Thai and Vietnamese. """
23 24
24 def __init__(self, cache_temperatures=None): 25 def __init__(self, cache_temperatures=None):
25 super(IntlKoThViPageSet, self).__init__( 26 super(IntlKoThViPageSet, self).__init__(
26 archive_data_file='data/intl_ko_th_vi.json', 27 archive_data_file='data/intl_ko_th_vi.json',
27 cloud_storage_bucket=story.PARTNER_BUCKET) 28 cloud_storage_bucket=story.PARTNER_BUCKET,
29 verify_names=True)
28 if cache_temperatures is None: 30 if cache_temperatures is None:
29 cache_temperatures = [cache_temperature_module.ANY] 31 cache_temperatures = [cache_temperature_module.ANY]
30 32
31 urls_list = [ 33 urls_list = [
32 # Why: #7 site in Vietnam 34 # Why: #7 site in Vietnam
33 'http://us.24h.com.vn/', 35 'http://us.24h.com.vn/',
34 # Why: #6 site in Vietnam 36 # Why: #6 site in Vietnam
35 'http://vnexpress.net/', 37 'http://vnexpress.net/',
36 # Why: #18 site in Vietnam 38 # Why: #18 site in Vietnam
37 'http://vietnamnet.vn/', 39 'http://vietnamnet.vn/',
(...skipping 11 matching lines...) Expand all
49 'http://www.chosun.com/', 51 'http://www.chosun.com/',
50 'http://www.danawa.com/', 52 'http://www.danawa.com/',
51 # Why: #10 site in Thailand 53 # Why: #10 site in Thailand
52 'http://pantip.com/', 54 'http://pantip.com/',
53 'http://thaimisc.com/' 55 'http://thaimisc.com/'
54 ] 56 ]
55 57
56 for url in urls_list: 58 for url in urls_list:
57 for temp in cache_temperatures: 59 for temp in cache_temperatures:
58 self.AddStory(IntlKoThViPage(url, self, cache_temperature=temp)) 60 self.AddStory(IntlKoThViPage(url, self, cache_temperature=temp))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698