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

Unified Diff: telemetry/telemetry/internal/story_runner.py

Issue 2777093004: Reland of Track telemetry benchmark cycle time (Closed)
Patch Set: Fix bad return Created 3 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
« no previous file with comments | « no previous file | telemetry/telemetry/internal/story_runner_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/story_runner.py
diff --git a/telemetry/telemetry/internal/story_runner.py b/telemetry/telemetry/internal/story_runner.py
index 375c26cf798a7f5d1841479b5d66aeebc2ee5b13..63e31b132533360a4dd71faf1c342b71d7163d1c 100644
--- a/telemetry/telemetry/internal/story_runner.py
+++ b/telemetry/telemetry/internal/story_runner.py
@@ -24,6 +24,7 @@ from telemetry import story as story_module
from telemetry.util import wpr_modes
from telemetry.value import failure
from telemetry.value import skip
+from telemetry.value import scalar
from telemetry.web_perf import story_test
@@ -301,6 +302,7 @@ def RunBenchmark(benchmark, finder_options):
The number of failure values (up to 254) or 255 if there is an uncaught
exception.
"""
+ start = time.time()
benchmark.CustomizeBrowserOptions(finder_options.browser_options)
benchmark_metadata = benchmark.GetMetadata()
@@ -375,6 +377,9 @@ def RunBenchmark(benchmark, finder_options):
results.UploadTraceFilesToCloud(bucket)
results.UploadProfilingFilesToCloud(bucket)
finally:
+ duration = time.time() - start
+ results.AddSummaryValue(scalar.ScalarValue(
+ None, 'BenchmarkDuration', 'minutes', duration / 60.0))
results.PrintSummary()
return return_code
« no previous file with comments | « no previous file | telemetry/telemetry/internal/story_runner_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698