diff options
author | nednguyen <nednguyen@google.com> | 2015-05-19 14:39:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-19 21:39:21 +0000 |
commit | 2905d303db21f120aab1914f98fe0e44284f82ed (patch) | |
tree | 4894dded7f0ebca86586ac4ecf72295600ba7684 /tools/perf | |
parent | d1f08340ba677fb4465d4d6968885f3c6433fae5 (diff) | |
download | chromium_src-2905d303db21f120aab1914f98fe0e44284f82ed.zip chromium_src-2905d303db21f120aab1914f98fe0e44284f82ed.tar.gz chromium_src-2905d303db21f120aab1914f98fe0e44284f82ed.tar.bz2 |
[Telemetry] Disable auto issuing record for thread_times
BUG=444705
CQ_EXTRA_TRYBOTS=tryserver.chromium.perf:linux_perf_bisect;tryserver.chromium.perf:mac_perf_bisect;tryserver.chromium.perf:android_nexus5_perf_bisect
Review URL: https://codereview.chromium.org/1140353003
Cr-Commit-Position: refs/heads/master@{#330613}
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/measurements/blink_style.py | 20 | ||||
-rw-r--r-- | tools/perf/measurements/thread_times.py | 3 | ||||
-rw-r--r-- | tools/perf/measurements/thread_times_unittest.py | 15 | ||||
-rw-r--r-- | tools/perf/measurements/timeline_controller.py | 17 | ||||
-rw-r--r-- | tools/perf/page_sets/key_idle_power_cases.py | 3 | ||||
-rw-r--r-- | tools/perf/page_sets/tough_compositor_cases.py | 3 |
6 files changed, 29 insertions, 32 deletions
diff --git a/tools/perf/measurements/blink_style.py b/tools/perf/measurements/blink_style.py index f9ef875..b46eab1 100644 --- a/tools/perf/measurements/blink_style.py +++ b/tools/perf/measurements/blink_style.py @@ -6,6 +6,7 @@ from itertools import starmap from collections import defaultdict from telemetry.core import util from telemetry.core import exceptions +from telemetry.page import action_runner from telemetry.page import page_test from telemetry.value import scalar @@ -28,15 +29,16 @@ class BlinkStyle(page_test.PageTest): self._controller.CleanUp(tab) def ValidateAndMeasurePage(self, page, tab, results): - tab.ExecuteJavaScript('console.time("wait-for-quiescence");') - try: - util.WaitFor(tab.HasReachedQuiescence, 15) - except exceptions.TimeoutException: - # Some sites never reach quiesence. As this benchmark normalizes/ - # categories results, it shouldn't be necessary to reach the same - # state on every run. - pass - tab.ExecuteJavaScript('console.timeEnd("wait-for-quiescence");') + runner = action_runner.ActionRunner(tab) + with runner.CreateInteraction('wait-for-quiescence'): + tab.ExecuteJavaScript('console.time("");') + try: + util.WaitFor(tab.HasReachedQuiescence, 15) + except exceptions.TimeoutException: + # Some sites never reach quiesence. As this benchmark normalizes/ + # categories results, it shouldn't be necessary to reach the same + # state on every run. + pass tab.ExecuteJavaScript( 'console.time("style-update");' diff --git a/tools/perf/measurements/thread_times.py b/tools/perf/measurements/thread_times.py index 0372a33..0526f91 100644 --- a/tools/perf/measurements/thread_times.py +++ b/tools/perf/measurements/thread_times.py @@ -17,7 +17,8 @@ class ThreadTimes(page_test.PageTest): self._report_silk_details = report_silk_details def WillNavigateToPage(self, page, tab): - self._timeline_controller = timeline_controller.TimelineController() + self._timeline_controller = timeline_controller.TimelineController( + enable_auto_issuing_record=False) if self._report_silk_details: # We need the other traces in order to have any details to report. self._timeline_controller.trace_categories = None diff --git a/tools/perf/measurements/thread_times_unittest.py b/tools/perf/measurements/thread_times_unittest.py index 3c39725..b77c6ff 100644 --- a/tools/perf/measurements/thread_times_unittest.py +++ b/tools/perf/measurements/thread_times_unittest.py @@ -41,21 +41,6 @@ class ThreadTimesUnitTest(page_test_test_case.PageTestTestCase): cpu_time = results.FindAllPageSpecificValuesNamed(cpu_time_name) self.assertEquals(len(cpu_time), 1) - def testBasicForPageWithNoGesture(self): - ps = self.CreateEmptyPageSet() - ps.AddUserStory(AnimatedPage(ps)) - - measurement = thread_times.ThreadTimes() - timeline_options = self._options - results = self.RunMeasurement(measurement, ps, options = timeline_options) - self.assertEquals(0, len(results.failures)) - - for interval in timeline.IntervalNames: - for category in timeline.TimelineThreadCategories.values(): - cpu_time_name = timeline.ThreadCpuTimeResultName(category, interval) - cpu_time = results.FindAllPageSpecificValuesNamed(cpu_time_name) - self.assertEquals(len(cpu_time), 1) - @decorators.Disabled('chromeos') # crbug.com/483212 def testWithSilkDetails(self): ps = self.CreatePageSetFromFileInUnittestDataDir('scrollable_page.html') diff --git a/tools/perf/measurements/timeline_controller.py b/tools/perf/measurements/timeline_controller.py index 2306c93..608a17a 100644 --- a/tools/perf/measurements/timeline_controller.py +++ b/tools/perf/measurements/timeline_controller.py @@ -5,6 +5,7 @@ from telemetry.core.platform import tracing_category_filter from telemetry.core.platform import tracing_options from telemetry.page import action_runner +from telemetry.page import page_test from telemetry.timeline.model import TimelineModel from telemetry.value import trace from telemetry.web_perf import smooth_gesture_util @@ -15,13 +16,14 @@ RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions' class TimelineController(object): - def __init__(self): + def __init__(self, enable_auto_issuing_record=True): super(TimelineController, self).__init__() self.trace_categories = None self._model = None self._renderer_process = None self._smooth_records = [] self._interaction = None + self._enable_auto_issuing_record = enable_auto_issuing_record def SetUp(self, page, tab): """Starts gathering timeline data. @@ -43,13 +45,15 @@ class TimelineController(object): def Start(self, tab): # Start the smooth marker for all actions. runner = action_runner.ActionRunner(tab) - self._interaction = runner.CreateInteraction( - RUN_SMOOTH_ACTIONS) - self._interaction.Begin() + if self._enable_auto_issuing_record: + self._interaction = runner.CreateInteraction( + RUN_SMOOTH_ACTIONS) + self._interaction.Begin() def Stop(self, tab, results): # End the smooth marker for all actions. - self._interaction.End() + if self._enable_auto_issuing_record: + self._interaction.End() # Stop tracing. timeline_data = tab.browser.platform.tracing_controller.Stop() results.AddValue(trace.TraceValue( @@ -81,6 +85,9 @@ class TimelineController(object): if len(self._smooth_records) == 0 and run_smooth_actions_record: self._smooth_records = [run_smooth_actions_record] + if len(self._smooth_records) == 0: + raise page_test.Failure('No interaction record was created.') + def CleanUp(self, tab): if tab.browser.platform.tracing_controller.is_tracing_running: diff --git a/tools/perf/page_sets/key_idle_power_cases.py b/tools/perf/page_sets/key_idle_power_cases.py index 207a1e3..c5ed0ce 100644 --- a/tools/perf/page_sets/key_idle_power_cases.py +++ b/tools/perf/page_sets/key_idle_power_cases.py @@ -33,7 +33,8 @@ class KeyIdlePowerPage(page_module.Page): def RunPageInteractions(self, action_runner): # The page interaction is simply waiting in an idle state. - action_runner.Wait(20) + with action_runner.CreateInteraction('IdleWaiting'): + action_runner.Wait(20) class KeyIdlePowerCasesPageSet(page_set_module.PageSet): diff --git a/tools/perf/page_sets/tough_compositor_cases.py b/tools/perf/page_sets/tough_compositor_cases.py index 66cc32c..a26a2c8 100644 --- a/tools/perf/page_sets/tough_compositor_cases.py +++ b/tools/perf/page_sets/tough_compositor_cases.py @@ -35,7 +35,8 @@ class ToughCompositorWaitPage(ToughCompositorPage): def RunPageInteractions(self, action_runner): # We scroll back and forth a few times to reduce noise in the tests. - action_runner.Wait(8) + with action_runner.CreateInteraction('Animation'): + action_runner.Wait(8) class ToughCompositorCasesPageSet(page_set_module.PageSet): |