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

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

Issue 100443007: telemetry: handle tests that are not supported on a platform. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Catch new exception in TestTracingCleanedUp. Created 6 years, 9 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
Index: tools/perf/measurements/rasterize_and_record_micro.py
diff --git a/tools/perf/measurements/rasterize_and_record_micro.py b/tools/perf/measurements/rasterize_and_record_micro.py
index cd9832f60700f8aaa7b03af8cedee8c9b42b0cf5..8b59fe2a48d9c9575f9cea8a8dfe6ba761f712ad 100644
--- a/tools/perf/measurements/rasterize_and_record_micro.py
+++ b/tools/perf/measurements/rasterize_and_record_micro.py
@@ -2,12 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import logging
import sys
import time
from telemetry.core.util import TimeoutException
from telemetry.page import page_measurement
+from telemetry.page import page_test
class RasterizeAndRecordMicro(page_measurement.PageMeasurement):
def __init__(self):
@@ -50,7 +50,9 @@ class RasterizeAndRecordMicro(page_measurement.PageMeasurement):
backend = browser._browser_backend # pylint: disable=W0212
if (not hasattr(backend, 'chrome_branch_number') or
(sys.platform != 'android' and backend.chrome_branch_number < 1713)):
- return
+ raise page_test.TestNotSupportedOnPlatformFailure(
+ 'rasterize_and_record_micro requires Chrome branch 1713 '
+ 'or later. Skipping measurement.')
# Check if the we actually have threaded forced compositing enabled.
system_info = browser.GetSystemInfo()
@@ -61,9 +63,9 @@ class RasterizeAndRecordMicro(page_measurement.PageMeasurement):
def MeasurePage(self, page, tab, results):
if not self._compositing_features_enabled:
- logging.warning('Warning: RasterizeAndRecordMicro requires forced, '
- 'threaded compositing and Chrome branch 1713 or newer.')
- return
+ raise page_test.TestNotSupportedOnPlatformFailure(
+ 'Compositing feature status unknown or not '+
+ 'forced and threaded. Skipping measurement.')
try:
tab.WaitForJavaScriptExpression("document.readyState == 'complete'", 10)
@@ -131,4 +133,3 @@ class RasterizeAndRecordMicro(page_measurement.PageMeasurement):
total_picture_layers_with_no_content)
results.Add('total_picture_layers_off_screen', 'count',
total_picture_layers_off_screen)
-
« no previous file with comments | « tools/perf/measurements/rasterize_and_record.py ('k') | tools/perf/measurements/rasterize_and_record_micro_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698