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

Side by Side Diff: tools/perf/page_sets/intl_ja_zh.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.page import cache_temperature as cache_temperature_module 6 from telemetry.page import cache_temperature as cache_temperature_module
7 from telemetry.page import shared_page_state 7 from telemetry.page import shared_page_state
8 from telemetry import story 8 from telemetry import story
9 9
10 10
11 class IntlJaZhPage(page_cycler_story.PageCyclerStory): 11 class IntlJaZhPage(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(IntlJaZhPage, self).__init__( 14 super(IntlJaZhPage, 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 IntlJaZhPageSet(story.StorySet): 21 class IntlJaZhPageSet(story.StorySet):
21 22
22 """ Popular pages in Japanese and Chinese. """ 23 """ Popular pages in Japanese and Chinese. """
23 24
24 def __init__(self, cache_temperatures=None): 25 def __init__(self, cache_temperatures=None):
25 super(IntlJaZhPageSet, self).__init__( 26 super(IntlJaZhPageSet, self).__init__(
26 archive_data_file='data/intl_ja_zh.json', 27 archive_data_file='data/intl_ja_zh.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: #5 Japanese site 34 # Why: #5 Japanese site
33 'http://www.amazon.co.jp', 35 'http://www.amazon.co.jp',
34 'http://mixi.jp/', 36 'http://mixi.jp/',
35 'http://dtiblog.com/', 37 'http://dtiblog.com/',
36 'http://2ch.net/', 38 'http://2ch.net/',
37 'http://jugem.jp/', 39 'http://jugem.jp/',
(...skipping 17 matching lines...) Expand all
55 # Why: #5 Chinese site 57 # Why: #5 Chinese site
56 # pylint: disable=line-too-long 58 # pylint: disable=line-too-long
57 'http://www.google.com.hk/#q=%E9%82%84%E6%8F%90%E4%BE%9B&fp=c44d333e710cb4 80', 59 'http://www.google.com.hk/#q=%E9%82%84%E6%8F%90%E4%BE%9B&fp=c44d333e710cb4 80',
58 'http://udn.com/NEWS/mainpage.shtml', 60 'http://udn.com/NEWS/mainpage.shtml',
59 'http://ruten.com.tw/' 61 'http://ruten.com.tw/'
60 ] 62 ]
61 63
62 for url in urls_list: 64 for url in urls_list:
63 for temp in cache_temperatures: 65 for temp in cache_temperatures:
64 self.AddStory(IntlJaZhPage(url, self, cache_temperature=temp)) 66 self.AddStory(IntlJaZhPage(url, self, cache_temperature=temp))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698