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

Side by Side Diff: tools/perf/page_sets/system_health/long_running_stories.py

Issue 2888133002: Modify list_system_health_stories to generate_system_health_csv (Closed)
Patch Set: Address Juan's nits Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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.login_helpers import google_login 5 from page_sets.login_helpers import google_login
6 from page_sets.system_health import platforms 6 from page_sets.system_health import platforms
7 from page_sets.system_health import system_health_story 7 from page_sets.system_health import system_health_story
8 8
9 from telemetry import decorators 9 from telemetry import decorators
10 10
(...skipping 12 matching lines...) Expand all
23 super(_LongRunningStory, self).RunPageInteractions(action_runner) 23 super(_LongRunningStory, self).RunPageInteractions(action_runner)
24 if self.BACKGROUND: 24 if self.BACKGROUND:
25 action_runner.tab.browser.tabs.New() 25 action_runner.tab.browser.tabs.New()
26 if self._take_memory_measurement: 26 if self._take_memory_measurement:
27 action_runner.MeasureMemory() 27 action_runner.MeasureMemory()
28 for _ in xrange(STEPS): 28 for _ in xrange(STEPS):
29 action_runner.Wait(SAMPLING_INTERVAL_IN_SECONDS) 29 action_runner.Wait(SAMPLING_INTERVAL_IN_SECONDS)
30 if self._take_memory_measurement: 30 if self._take_memory_measurement:
31 action_runner.MeasureMemory() 31 action_runner.MeasureMemory()
32 32
33 @classmethod
34 def GenerateStoryDescription(cls):
35 if cls.BACKGROUND:
36 return ('Load %s then open a new blank tab and let the loaded page stay '
37 'in background for %s seconds.' % (cls.URL, IDLE_TIME_IN_SECONDS))
38 else:
39 return ('Load %s then let it stay in foreground for %s seconds.' %
40 (cls.URL, IDLE_TIME_IN_SECONDS))
41
33 42
34 ############################################################################## 43 ##############################################################################
35 # Long running Gmail stories. 44 # Long running Gmail stories.
36 ############################################################################## 45 ##############################################################################
37 46
38 # TODO(rnephew): Merge _Login() and _DidLoadDocument() with methods in 47 # TODO(rnephew): Merge _Login() and _DidLoadDocument() with methods in
39 # loading_stories. 48 # loading_stories.
40 class _LongRunningGmailBase(_LongRunningStory): 49 class _LongRunningGmailBase(_LongRunningStory):
41 URL = 'https://mail.google.com/mail/' 50 URL = 'https://mail.google.com/mail/'
42 ABSTRACT_STORY = True 51 ABSTRACT_STORY = True
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 @decorators.Disabled('android-webview', # Weview does not have tabs. 105 @decorators.Disabled('android-webview', # Weview does not have tabs.
97 'android') # crbug.com/657433 106 'android') # crbug.com/657433
98 class LongRunningGmailMobileBackgroundStory(_LongRunningGmailMobileBase): 107 class LongRunningGmailMobileBackgroundStory(_LongRunningGmailMobileBase):
99 BACKGROUND = True 108 BACKGROUND = True
100 NAME = 'long_running:tools:gmail-background' 109 NAME = 'long_running:tools:gmail-background'
101 110
102 111
103 class LongRunningGmailDesktopBackgroundStory(_LongRunningGmailDesktopBase): 112 class LongRunningGmailDesktopBackgroundStory(_LongRunningGmailDesktopBase):
104 BACKGROUND = True 113 BACKGROUND = True
105 NAME = 'long_running:tools:gmail-background' 114 NAME = 'long_running:tools:gmail-background'
OLDNEW
« no previous file with comments | « tools/perf/page_sets/system_health/loading_stories.py ('k') | tools/perf/page_sets/system_health/media_stories.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698