Skip to content

Commit

Permalink
[Telemetry] Report stddev for JetStream.
Browse files Browse the repository at this point in the history
Previously, we flattened all the iterations and reported one number. Now we
report the geo mean of each iteration so that the dashboard can display the
stddev.

BUG=405719

Review URL: https://codereview.chromium.org/493153002

Cr-Commit-Position: refs/heads/master@{#291248}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291248 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
tonyg@chromium.org committed Aug 21, 2014
1 parent bcb39e8 commit a59fa45
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tools/perf/benchmarks/jetstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from telemetry.page import page_test
from telemetry.util import statistics
from telemetry.value import list_of_scalar_values
from telemetry.value import scalar


class _JetstreamMeasurement(page_test.PageTest):
Expand Down Expand Up @@ -59,16 +58,21 @@ def ValidateAndMeasurePage(self, page, tab, results):
result = tab.EvaluateJavaScript(get_results_js)
result = json.loads(result.partition(': ')[2])

all_scores = []
all_score_lists = []
for k, v in result.iteritems():
results.AddValue(list_of_scalar_values.ListOfScalarValues(
results.current_page, k.replace('.', '_'), 'score', v['result'],
important=False))
# Collect all test scores to compute geometric mean.
all_scores.extend(v['result'])
total = statistics.GeometricMean(all_scores)
results.AddSummaryValue(
scalar.ScalarValue(None, 'Score', 'score', total))
for i, score in enumerate(v['result']):
if len(all_score_lists) <= i:
all_score_lists.append([])
all_score_lists[i].append(score)
all_scores = []
for score_list in all_score_lists:
all_scores.append(statistics.GeometricMean(score_list))
results.AddSummaryValue(list_of_scalar_values.ListOfScalarValues(
None, 'Score', 'score', all_scores))


@benchmark.Disabled('android', 'xp') # crbug.com/381742
Expand Down

0 comments on commit a59fa45

Please sign in to comment.