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

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

Issue 1458083003: [Telemetry + tools/perf] Modify the pylint disable message to use symbolic name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 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 from telemetry.page import shared_page_state 4 from telemetry.page import shared_page_state
5 from telemetry import story 5 from telemetry import story
6 6
7 from page_sets import top_pages 7 from page_sets import top_pages
8 8
9 9
10 def _Reload(action_runner): 10 def _Reload(action_runner):
11 # Numbers below are chosen arbitrarily. For the V8DetachedContextAgeInGC 11 # Numbers below are chosen arbitrarily. For the V8DetachedContextAgeInGC
12 # the number of reloads should be high enough so that V8 could do few 12 # the number of reloads should be high enough so that V8 could do few
13 # incremeantal GCs. 13 # incremeantal GCs.
14 NUMBER_OF_RELOADS = 7 14 NUMBER_OF_RELOADS = 7
15 WAIT_TIME = 2 15 WAIT_TIME = 2
16 for _ in xrange(NUMBER_OF_RELOADS): 16 for _ in xrange(NUMBER_OF_RELOADS):
17 action_runner.ReloadPage() 17 action_runner.ReloadPage()
18 action_runner.Wait(WAIT_TIME) 18 action_runner.Wait(WAIT_TIME)
19 19
20 20
21 def _CreatePageClassWithReload(page_cls): 21 def _CreatePageClassWithReload(page_cls):
22 class DerivedSmoothPage(page_cls): # pylint: disable=W0232 22 class DerivedSmoothPage(page_cls): # pylint: disable=no-init
23 23
24 def RunPageInteractions(self, action_runner): 24 def RunPageInteractions(self, action_runner):
25 _Reload(action_runner) 25 _Reload(action_runner)
26 return DerivedSmoothPage 26 return DerivedSmoothPage
27 27
28 28
29 class PageReloadCasesPageSet(story.StorySet): 29 class PageReloadCasesPageSet(story.StorySet):
30 30
31 """ Pages for testing GC efficiency on page reload. """ 31 """ Pages for testing GC efficiency on page reload. """
32 32
33 def __init__(self): 33 def __init__(self):
34 super(PageReloadCasesPageSet, self).__init__( 34 super(PageReloadCasesPageSet, self).__init__(
35 archive_data_file='data/top_25.json', 35 archive_data_file='data/top_25.json',
36 cloud_storage_bucket=story.PARTNER_BUCKET) 36 cloud_storage_bucket=story.PARTNER_BUCKET)
37 37
38 shared_desktop_state = shared_page_state.SharedDesktopPageState 38 shared_desktop_state = shared_page_state.SharedDesktopPageState
39 39
40 self.AddStory(_CreatePageClassWithReload( 40 self.AddStory(_CreatePageClassWithReload(
41 top_pages.GoogleWebSearchPage)(self, shared_desktop_state)) 41 top_pages.GoogleWebSearchPage)(self, shared_desktop_state))
42 self.AddStory(_CreatePageClassWithReload( 42 self.AddStory(_CreatePageClassWithReload(
43 top_pages.GoogleDocPage)(self, shared_desktop_state)) 43 top_pages.GoogleDocPage)(self, shared_desktop_state))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/page_cycler/moz2.py ('k') | tools/perf/page_sets/service_worker_micro_benchmark.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698