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

Side by Side Diff: tools/perf/perf_tools/dom_perf.py

Issue 18261009: Have repeats understand "time" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 5 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import json 5 import json
6 import math 6 import math
7 import os 7 import os
8 8
9 from telemetry.core import util 9 from telemetry.core import util
10 from telemetry.page import page_measurement 10 from telemetry.page import page_measurement
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 data = json.loads(tab.EvaluateJavaScript('__domperf_result')) 65 data = json.loads(tab.EvaluateJavaScript('__domperf_result'))
66 for suite in data['BenchmarkSuites']: 66 for suite in data['BenchmarkSuites']:
67 # Skip benchmarks that we didn't actually run this time around. 67 # Skip benchmarks that we didn't actually run this time around.
68 if len(suite['Benchmarks']) or suite['score']: 68 if len(suite['Benchmarks']) or suite['score']:
69 results.Add(SCORE_TRACE_NAME, SCORE_UNIT, 69 results.Add(SCORE_TRACE_NAME, SCORE_UNIT,
70 suite['score'], suite['name'], 'unimportant') 70 suite['score'], suite['name'], 'unimportant')
71 finally: 71 finally:
72 tab.EvaluateJavaScript('document.cookie = "__domperf_finished=0"') 72 tab.EvaluateJavaScript('document.cookie = "__domperf_finished=0"')
73 73
74 def DidRunPageSet(self, tab, results): 74 def DidRunTest(self, tab, results):
75 # Now give the geometric mean as the total for the combined runs. 75 # Now give the geometric mean as the total for the combined runs.
76 scores = [] 76 scores = []
77 for result in results.page_results: 77 for result in results.page_results:
78 scores.append(result[SCORE_TRACE_NAME].output_value) 78 scores.append(result[SCORE_TRACE_NAME].output_value)
79 total = _GeometricMean(scores) 79 total = _GeometricMean(scores)
80 results.AddSummary(SCORE_TRACE_NAME, SCORE_UNIT, total, 'Total') 80 results.AddSummary(SCORE_TRACE_NAME, SCORE_UNIT, total, 'Total')
OLDNEW
« no previous file with comments | « no previous file | tools/perf/perf_tools/page_cycler.py » ('j') | tools/telemetry/telemetry/core/browser_options.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698