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

Unified Diff: tools/perf/page_sets/repaint_helpers.py

Issue 2876073003: Migrate cluster telemetry benchmarks to tools/perf/contrib/cluster_telemetry/ (Closed)
Patch Set: Remove BENCHMARKS_BLACK_LIST Created 3 years, 7 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/page_sets/repaint_helpers.py
diff --git a/tools/perf/page_sets/repaint_helpers.py b/tools/perf/page_sets/repaint_helpers.py
deleted file mode 100644
index b6b9472c50df061b5fe54e5761f16097566510ea..0000000000000000000000000000000000000000
--- a/tools/perf/page_sets/repaint_helpers.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from telemetry.page import legacy_page_test
-
-
-def Repaint(action_runner, mode='viewport', width=None, height=None):
- action_runner.WaitForJavaScriptCondition(
- 'document.readyState == "complete"', timeout=90)
- # Rasterize only what's visible.
- action_runner.ExecuteJavaScript(
- 'chrome.gpuBenchmarking.setRasterizeOnlyVisibleContent();')
-
- args = {}
- args['mode'] = mode
- if width:
- args['width'] = width
- if height:
- args['height'] = height
-
- # Enqueue benchmark
- action_runner.ExecuteJavaScript("""
- window.benchmark_results = {};
- window.benchmark_results.id =
- chrome.gpuBenchmarking.runMicroBenchmark(
- "invalidation_benchmark",
- function(value) {},
- {{ args }}
- );
- """,
- args=args)
-
- micro_benchmark_id = action_runner.EvaluateJavaScript(
- 'window.benchmark_results.id')
- if not micro_benchmark_id:
- raise legacy_page_test.MeasurementFailure(
- 'Failed to schedule invalidation_benchmark.')
-
- with action_runner.CreateInteraction('Repaint'):
- action_runner.RepaintContinuously(seconds=5)
-
- action_runner.ExecuteJavaScript("""
- window.benchmark_results.message_handled =
- chrome.gpuBenchmarking.sendMessageToMicroBenchmark(
- {{ micro_benchmark_id }}, {
- "notify_done": true
- });
- """,
- micro_benchmark_id=micro_benchmark_id)
-
-
-def WaitThenRepaint(action_runner):
- action_runner.Wait(2)
- Repaint(action_runner)

Powered by Google App Engine
This is Rietveld 408576698