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

Unified Diff: build/android/pylib/perf_tests_helper.py

Issue 11826053: Telemetry (memory benchmark): Add histogram Memory.RendererUsed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops Created 7 years, 11 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 | tools/perf/perf_tools/memory_benchmark.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/perf_tests_helper.py
diff --git a/build/android/pylib/perf_tests_helper.py b/build/android/pylib/perf_tests_helper.py
index bec92a20d2a1bcb308322ba658d08b5c7e304692..942c617226d2d83ed5c7209c7fb0780e46b75955 100644
--- a/build/android/pylib/perf_tests_helper.py
+++ b/build/android/pylib/perf_tests_helper.py
@@ -23,6 +23,9 @@ def _EscapePerfResult(s):
def GeomMeanAndStdDevFromHistogram(histogram_json):
histogram = json.loads(histogram_json)
+ # Handle empty histograms gracefully.
+ if not 'buckets' in histogram:
+ return 0.0, 0.0
count = 0
sum_of_logs = 0
for bucket in histogram['buckets']:
« no previous file with comments | « no previous file | tools/perf/perf_tools/memory_benchmark.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698