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

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

Issue 1198823004: Update perf page_set to use story_set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/gmail_refresh.py ('k') | tools/perf/page_sets/image_decoding_cases.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 os 5 import os
6 6
7 from page_sets import top_7_stress
8 from page_sets import top_pages
9 from telemetry import story
7 from telemetry.page import shared_page_state 10 from telemetry.page import shared_page_state
8 from telemetry.page import page_set as page_set_module
9
10 from page_sets import top_pages
11 from page_sets import top_7_stress
12 11
13 12
14 def _SpawnTab(action_runner): 13 def _SpawnTab(action_runner):
15 return action_runner.EvaluateJavaScript('__telemetry_spawn_tab()') 14 return action_runner.EvaluateJavaScript('__telemetry_spawn_tab()')
16 15
17 16
18 def _CloseTab(action_runner, tab): 17 def _CloseTab(action_runner, tab):
19 action_runner.EvaluateJavaScript('__telemetry_close_tab(' + str(tab) + ')') 18 action_runner.EvaluateJavaScript('__telemetry_close_tab(' + str(tab) + ')')
20 19
21 20
(...skipping 18 matching lines...) Expand all
40 for tab in xrange(MAX_TABS): 39 for tab in xrange(MAX_TABS):
41 tabs[tab] = _SpawnTab(action_runner) 40 tabs[tab] = _SpawnTab(action_runner)
42 action_runner.Wait(20) 41 action_runner.Wait(20)
43 # Quickly close tabs. 42 # Quickly close tabs.
44 for tab in xrange(MAX_TABS): 43 for tab in xrange(MAX_TABS):
45 _CloseTab(action_runner, tabs[tab]) 44 _CloseTab(action_runner, tabs[tab])
46 action_runner.Wait(30) 45 action_runner.Wait(30)
47 return DerivedIdleMultiTabPage 46 return DerivedIdleMultiTabPage
48 47
49 48
50 class IdleMultiTabCasesPageSet(page_set_module.PageSet): 49 class IdleMultiTabCasesPageSet(story.StorySet):
51 50
52 """ Pages for testing GC efficiency on idle pages. """ 51 """ Pages for testing GC efficiency on idle pages. """
53 52
54 def __init__(self): 53 def __init__(self):
55 super(IdleMultiTabCasesPageSet, self).__init__( 54 super(IdleMultiTabCasesPageSet, self).__init__(
56 archive_data_file='data/top_25.json', 55 archive_data_file='data/top_25.json',
57 bucket=page_set_module.PARTNER_BUCKET) 56 cloud_storage_bucket=story.PARTNER_BUCKET)
58 with open(os.path.join(os.path.dirname(__file__), 57 with open(os.path.join(os.path.dirname(__file__),
59 'idle_multi_tab_cases.js')) as f: 58 'idle_multi_tab_cases.js')) as f:
60 base_js = f.read() 59 base_js = f.read()
61 self.AddUserStory( 60 self.AddUserStory(
62 _CreateIdleMultiTabPageClass(top_pages.GoogleDocPage, base_js) 61 _CreateIdleMultiTabPageClass(top_pages.GoogleDocPage, base_js)
63 (self, shared_page_state.SharedDesktopPageState)) 62 (self, shared_page_state.SharedDesktopPageState))
64 self.AddUserStory( 63 self.AddUserStory(
65 _CreateIdleMultiTabPageClass(top_7_stress.GooglePlusPage, base_js) 64 _CreateIdleMultiTabPageClass(top_7_stress.GooglePlusPage, base_js)
66 (self)) 65 (self))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/gmail_refresh.py ('k') | tools/perf/page_sets/image_decoding_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698