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

Side by Side Diff: tools/perf/page_sets/intl_hi_ru.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 IntlHiRuPage(page_cycler_story.PageCyclerStory): 11 class IntlHiRuPage(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(IntlHiRuPage, self).__init__( 14 super(IntlHiRuPage, 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 self.archive_data_file = 'data/intl_hi_ru.json' 19 self.archive_data_file = 'data/intl_hi_ru.json'
19 20
20 21
21 class IntlHiRuPageSet(story.StorySet): 22 class IntlHiRuPageSet(story.StorySet):
22 23
23 """ Popular pages in Hindi and Russian. """ 24 """ Popular pages in Hindi and Russian. """
24 25
25 def __init__(self, cache_temperatures=None): 26 def __init__(self, cache_temperatures=None):
26 super(IntlHiRuPageSet, self).__init__( 27 super(IntlHiRuPageSet, self).__init__(
27 archive_data_file='data/intl_hi_ru.json', 28 archive_data_file='data/intl_hi_ru.json',
28 cloud_storage_bucket=story.PARTNER_BUCKET) 29 cloud_storage_bucket=story.PARTNER_BUCKET,
30 verify_names=True)
29 if cache_temperatures is None: 31 if cache_temperatures is None:
30 cache_temperatures = [cache_temperature_module.ANY] 32 cache_temperatures = [cache_temperature_module.ANY]
31 33
32 urls_list = [ 34 urls_list = [
33 # Why: #12 site in Russia 35 # Why: #12 site in Russia
34 'http://www.rambler.ru/', 36 'http://www.rambler.ru/',
35 'http://apeha.ru/', 37 'http://apeha.ru/',
36 # pylint: disable=line-too-long 38 # pylint: disable=line-too-long
37 'http://yandex.ru/yandsearch?lr=102567&text=%D0%9F%D0%BE%D0%B3%D0%BE%D0%B4 %D0%B0', 39 'http://yandex.ru/yandsearch?lr=102567&text=%D0%9F%D0%BE%D0%B3%D0%BE%D0%B4 %D0%B0',
38 'http://photofile.ru/', 40 'http://photofile.ru/',
39 'http://ru.wikipedia.org/', 41 'http://ru.wikipedia.org/',
40 'http://narod.yandex.ru/', 42 'http://narod.yandex.ru/',
41 # Why: #15 in Russia 43 # Why: #15 in Russia
42 'http://rutracker.org/forum/index.php', 44 'http://rutracker.org/forum/index.php',
43 'http://hindi.webdunia.com/', 45 'http://hindi.webdunia.com/',
44 # Why: #49 site in India 46 # Why: #49 site in India
45 'http://hindi.oneindia.in/', 47 'http://hindi.oneindia.in/',
46 # Why: #9 site in India 48 # Why: #9 site in India
47 'http://www.indiatimes.com/', 49 'http://www.indiatimes.com/',
48 # Why: #2 site in India 50 # Why: #2 site in India
49 'http://news.google.co.in/nwshp?tab=in&hl=hi' 51 'http://news.google.co.in/nwshp?tab=in&hl=hi'
50 ] 52 ]
51 53
52 for url in urls_list: 54 for url in urls_list:
53 for temp in cache_temperatures: 55 for temp in cache_temperatures:
54 self.AddStory(IntlHiRuPage(url, self, cache_temperature=temp)) 56 self.AddStory(IntlHiRuPage(url, self, cache_temperature=temp))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698