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

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

Issue 1100853003: Make quiesence test best-effort for the blink_style benchmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skip updateStyle measurement when resolverAccessCount is missing Created 5 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 | « tools/perf/benchmarks/blink_style.py ('k') | tools/perf/measurements/blink_style_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/blink_style.py
diff --git a/tools/perf/measurements/blink_style.py b/tools/perf/measurements/blink_style.py
index f89ab980085c4fc912debb5ce4d6af451428a12b..f76cdf2575deb9ab4a9a84d50c1ec5ce9d691780 100644
--- a/tools/perf/measurements/blink_style.py
+++ b/tools/perf/measurements/blink_style.py
@@ -4,8 +4,8 @@
from itertools import starmap
from collections import defaultdict
-
from telemetry.core import util
+from telemetry.core import exceptions
from telemetry.page import page_test
from telemetry.value import scalar
@@ -19,7 +19,7 @@ class BlinkStyle(page_test.PageTest):
def WillNavigateToPage(self, page, tab):
self._controller = timeline_controller.TimelineController()
- self._controller.trace_categories = 'blink,benchmark,blink.console'
+ self._controller.trace_categories = 'blink_style,blink.console'
self._controller.SetUp(page, tab)
self._controller.Start(tab)
@@ -28,9 +28,12 @@ class BlinkStyle(page_test.PageTest):
self._controller.CleanUp(tab)
def ValidateAndMeasurePage(self, page, tab, results):
- tab.WaitForDocumentReadyStateToBeComplete()
- if not util.WaitFor(tab.HasReachedQuiescence, 30):
- raise page_test.MeasurementFailure('Failed to reach quiesence.')
+ tab.ExecuteJavaScript('console.time("wait-for-quiescence");')
+ try:
+ util.WaitFor(tab.HasReachedQuiescence, 15)
+ except exceptions.TimeoutException:
dtu 2015/04/27 13:02:20 ? Can you add a comment explaining why you want to
+ pass
+ tab.ExecuteJavaScript('console.timeEnd("wait-for-quiescence");')
tab.ExecuteJavaScript(
'console.time("style-update");'
@@ -62,7 +65,10 @@ class BlinkStyle(page_test.PageTest):
if (event.name == 'Document::updateStyle'
and event.start >= marker.start
and event.end <= marker.end):
- access_count = event.args['resolverAccessCount']
+ access_count = event.get('resolverAccessCount')
+ if access_count is None:
+ # absent in earlier versions
+ continue
min_access_count = 50
if access_count >= min_access_count:
« no previous file with comments | « tools/perf/benchmarks/blink_style.py ('k') | tools/perf/measurements/blink_style_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698