Chromium Code Reviews| Index: tools/perf/page_sets/long_running_idle_google_cases.py |
| diff --git a/tools/perf/page_sets/long_running_idle_google_cases.py b/tools/perf/page_sets/long_running_idle_google_cases.py |
| index 9b46f8c2c96948e5f7db9439595ff795a735977a..7e3e3de19eb4d0b9336d978ccd84b2e23e9dd0f8 100644 |
| --- a/tools/perf/page_sets/long_running_idle_google_cases.py |
| +++ b/tools/perf/page_sets/long_running_idle_google_cases.py |
| @@ -6,19 +6,20 @@ from telemetry import story |
| from page_sets import google_pages |
| -STARTUP_TIME_IN_SECONDS = 2 |
| IDLE_TIME_IN_SECONDS = 100 |
| +SAMPLING_INTERVAL_IN_SECONDS = 1 |
| + |
| +def _IdleAction(action_runner): |
| + action_runner.tab.browser.DumpMemory() |
| + steps = IDLE_TIME_IN_SECONDS / SAMPLING_INTERVAL_IN_SECONDS |
|
petrcermak
2016/04/27 16:22:17
why not make this a global constant as well?
ulan
2016/04/28 14:34:35
Done.
|
| + for _ in xrange(steps): |
| + action_runner.Wait(SAMPLING_INTERVAL_IN_SECONDS) |
| + action_runner.tab.browser.DumpMemory() |
| def _CreateIdlePageClass(base_page_cls): |
| class DerivedIdlePage(base_page_cls): # pylint: disable=no-init |
| def RunPageInteractions(self, action_runner): |
| - action_runner.Wait(STARTUP_TIME_IN_SECONDS) |
| - with action_runner.CreateInteraction('Begin'): |
| - action_runner.tab.browser.DumpMemory() |
| - with action_runner.CreateInteraction('Idle'): |
| - action_runner.Wait(IDLE_TIME_IN_SECONDS) |
| - with action_runner.CreateInteraction('End'): |
| - action_runner.tab.browser.DumpMemory() |
| + _IdleAction(action_runner) |
| return DerivedIdlePage |
| @@ -26,7 +27,7 @@ def _CreateIdleBackgroundPageClass(base_page_cls): |
| class DerivedIdlePage(base_page_cls): # pylint: disable=no-init |
| def RunPageInteractions(self, action_runner): |
| action_runner.tab.browser.tabs.New() |
| - action_runner.Wait(IDLE_TIME_IN_SECONDS) |
| + _IdleAction(action_runner) |
| return DerivedIdlePage |