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

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

Issue 636203002: Task Execution Duration metrics added as a new benchmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: White space fix + removal of debug code Created 6 years, 2 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 from telemetry.page import page as page_module 4 from telemetry.page import page as page_module
5 from telemetry.page import page_set as page_set_module 5 from telemetry.page import page_set as page_set_module
6 6
7 7
8 class KeyMobileSitesPage(page_module.Page): 8 class KeyMobileSitesPage(page_module.Page):
9 9
10 def __init__(self, url, page_set, name=''): 10 def __init__(self, url, page_set, name=''):
11 super(KeyMobileSitesPage, self).__init__( 11 super(KeyMobileSitesPage, self).__init__(
12 url=url, page_set=page_set, name=name, 12 url=url, page_set=page_set, name=name,
13 credentials_path = 'data/credentials.json') 13 credentials_path='data/credentials.json')
14 self.user_agent_type = 'mobile' 14 self.user_agent_type = 'mobile'
15 self.archive_data_file = 'data/key_mobile_sites.json' 15 self.archive_data_file = 'data/key_mobile_sites.json'
16 16
17 def RunSmoothness(self, action_runner): 17 def RunSmoothness(self, action_runner):
18 interaction = action_runner.BeginGestureInteraction( 18 interaction = action_runner.BeginGestureInteraction(
19 'ScrollAction', is_smooth=True) 19 'ScrollAction', is_smooth=True)
20 action_runner.ScrollPage() 20 action_runner.ScrollPage()
21 interaction.End() 21 interaction.End()
22 22
23 def RunRepaint(self, action_runner): 23 def RunRepaint(self, action_runner):
24 action_runner.RepaintContinuously(seconds=5) 24 action_runner.RepaintContinuously(seconds=5)
25 25
26 def RunTaskExecutionTime(self, action_runner):
27 interaction = action_runner.BeginGestureInteraction(
28 'ScrollAction', is_smooth=True)
29 action_runner.ScrollPage()
30 interaction.End()
31
26 32
27 class Page1(KeyMobileSitesPage): 33 class Page1(KeyMobileSitesPage):
28 34
29 """ Why: Top news site """ 35 """ Why: Top news site """
30 36
31 def __init__(self, page_set): 37 def __init__(self, page_set):
32 super(Page1, self).__init__( 38 super(Page1, self).__init__(
33 url='http://nytimes.com/', 39 url='http://nytimes.com/',
34 page_set=page_set) 40 page_set=page_set)
35 41
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&' 544 ('http://www.baidu.com/s?wd=barack+obama&rsv_bp=0&rsv_spt=3&rsv_sug3=9&'
539 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'), 545 'rsv_sug=0&rsv_sug4=3824&rsv_sug1=3&inputT=4920'),
540 # Why: Top search engine 546 # Why: Top search engine
541 'http://www.bing.com/search?q=sloths', 547 'http://www.bing.com/search?q=sloths',
542 # Why: Good example of poor initial scrolling 548 # Why: Good example of poor initial scrolling
543 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans' 549 'http://ftw.usatoday.com/2014/05/spelling-bee-rules-shenanigans'
544 ] 550 ]
545 551
546 for url in urls_list: 552 for url in urls_list:
547 self.AddPage(KeyMobileSitesPage(url, self)) 553 self.AddPage(KeyMobileSitesPage(url, self))
OLDNEW
« no previous file with comments | « tools/perf/measurements/task_execution_time_unittest.py ('k') | tools/perf/page_sets/tough_scheduling_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698