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

Unified Diff: tools/perf/benchmarks/peacekeeper.py

Issue 714273004: mac: Expose keychain access frequency to Telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mock_keychain_sleep
Patch Set: Add a common subclass to measurements. Created 6 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
Index: tools/perf/benchmarks/peacekeeper.py
diff --git a/tools/perf/benchmarks/peacekeeper.py b/tools/perf/benchmarks/peacekeeper.py
index 57b7e62e5e109b68fdbd693940ea27665bfaea1d..677973baac930519def1833362f6fe4fdd0f76f8 100644
--- a/tools/perf/benchmarks/peacekeeper.py
+++ b/tools/perf/benchmarks/peacekeeper.py
@@ -14,15 +14,15 @@ second depending on the test. Final Score is computed by calculating geometric
mean of individual tests scores.
"""
+from measurements import PageTestMeasurement
from telemetry import benchmark
from telemetry.page import page_set
-from telemetry.page import page_test
from telemetry.util import statistics
from telemetry.value import merge_values
from telemetry.value import scalar
-class _PeaceKeeperMeasurement(page_test.PageTest):
+class _PeaceKeeperMeasurement(PageTestMeasurement):
def WillNavigateToPage(self, page, tab):
page.script_to_evaluate_on_commit = """
@@ -51,13 +51,15 @@ class _PeaceKeeperMeasurement(page_test.PageTest):
}
"""
- def ValidateAndMeasurePage(self, _, tab, results):
+ def ValidateAndMeasurePage(self, page, tab, results):
tab.WaitForJavaScriptExpression('_done', 600)
result = tab.EvaluateJavaScript('__results')
results.AddValue(scalar.ScalarValue(
results.current_page, '%s.Score' % result['test'], 'score',
int(result['score'])), important=False)
+ super(_PeaceKeeperMeasurement, self).ValidateAndMeasurePage(
+ page, tab, results)
def DidRunTest(self, browser, results):
# Calculate geometric mean as the total for the combined tests.

Powered by Google App Engine
This is Rietveld 408576698