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

Unified Diff: tools/perf/measurements/page_cycler_unittest.py

Issue 57863002: Update page cycler to differenciate between cold and warm run by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/measurements/page_cycler.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/page_cycler_unittest.py
diff --git a/tools/perf/measurements/page_cycler_unittest.py b/tools/perf/measurements/page_cycler_unittest.py
index 89d0a5704cceb37892767ad4943be20bcea39b31..ea84745823c4892ce6ccb0aecc8950323e37056b 100644
--- a/tools/perf/measurements/page_cycler_unittest.py
+++ b/tools/perf/measurements/page_cycler_unittest.py
@@ -49,21 +49,18 @@ class PageCyclerUnitTest(unittest.TestCase):
def testOptionsColdLoadNoArgs(self):
tonyg 2013/11/06 18:31:49 I find the code a little hard to follow. Could we
cycler = self.setupCycler([])
- self.assertFalse(cycler._cold_runs_requested)
- self.assertEqual(cycler._number_warm_runs, 9)
+ self.assertEquals(cycler._cold_run_start_index, 10)
def testOptionsColdLoadPagesetRepeat(self):
cycler = self.setupCycler(['--pageset-repeat=20', '--page-repeat=2'])
- self.assertFalse(cycler._cold_runs_requested)
- self.assertEqual(cycler._number_warm_runs, 38)
+ self.assertEquals(cycler._cold_run_start_index, 40)
def testOptionsColdLoadRequested(self):
cycler = self.setupCycler(['--pageset-repeat=21', '--page-repeat=2',
'--cold-load-percent=40'])
- self.assertTrue(cycler._cold_runs_requested)
- self.assertEqual(cycler._number_warm_runs, 24)
+ self.assertEquals(cycler._cold_run_start_index, 26)
def testIncompatibleOptions(self):
exception_seen = False
@@ -131,5 +128,5 @@ class PageCyclerUnitTest(unittest.TestCase):
self.assertEqual(result.values[0].trace_name, 'page_load_time')
self.assertEqual(result.values[0].units, 'ms')
self.assertEqual(result.values[0].chart_name,
- 'warm_times' if i < 3 else 'cold_times')
+ 'warm_times' if i > 0 and i < 3 else 'cold_times')
cycler.DidNavigateToPage(page, tab)
« no previous file with comments | « tools/perf/measurements/page_cycler.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698