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

Unified Diff: chrome/test/functional/perf_endure.py

Issue 10372002: Chrome Endure Gmail test ComposeDiscardSleep has a new sleeping pattern. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/perf_endure.py
diff --git a/chrome/test/functional/perf_endure.py b/chrome/test/functional/perf_endure.py
index 23e27304b842db2abad29ab14e4d029e121b8d44..cc0484171dde7475870cb43f062c916fb16bc6c3 100755
--- a/chrome/test/functional/perf_endure.py
+++ b/chrome/test/functional/perf_endure.py
@@ -116,13 +116,13 @@ class ChromeEndureBaseTest(perf.BasePerfTest):
last_perf_stats_time = time.time()
self._GetPerformanceStats(
webapp_name, test_description, tab_title_substring)
- iteration_num = 0
+ self._iteration_num = 0 # Available to |do_scenario| if needed.
self._remote_inspector_client.StartTimelineEventMonitoring(
self._OnTimelineEvent)
while time.time() - self._test_start_time < self._test_length_sec:
- iteration_num += 1
+ self._iteration_num += 1
if self._num_errors >= self._ERROR_COUNT_THRESHOLD:
logging.error('Error count threshold (%d) reached. Terminating test '
@@ -134,11 +134,11 @@ class ChromeEndureBaseTest(perf.BasePerfTest):
self._GetPerformanceStats(
webapp_name, test_description, tab_title_substring)
- if iteration_num % 10 == 0:
+ if self._iteration_num % 10 == 0:
remaining_time = self._test_length_sec - (time.time() -
self._test_start_time)
logging.info('Chrome interaction #%d. Time remaining in test: %d sec.' %
- (iteration_num, remaining_time))
+ (self._iteration_num, remaining_time))
do_scenario()
@@ -569,8 +569,10 @@ class ChromeEndureGmailTest(ChromeEndureBaseTest):
self._wait.until(lambda _: not self._GetElement(
self._driver.find_element_by_name, 'to'))
- logging.debug('Sleeping 30 seconds.')
- time.sleep(30)
+ # Sleep 2 minutes after every batch of 500 compose/discard iterations.
+ if self._iteration_num % 500 == 0:
+ logging.info('Sleeping 2 minutes.')
+ time.sleep(120)
self._RunEndureTest(self._webapp_name, self._tab_title_substring,
test_description, scenario)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698