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

Side by Side Diff: tools/perf/measurements/blink_perf.py

Issue 23545023: [Telemetry] Add 'name' attribute for pages, which allows for more human-readable printing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to update the unitttests :( Created 7 years, 3 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 | Annotate | Revision Log
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 """This measurement runs a blink performance test and reports the results.""" 5 """This measurement runs a blink performance test and reports the results."""
6 6
7 import os 7 import os
8 import sys 8 import sys
9 9
10 from telemetry.core import util 10 from telemetry.core import util
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 util.WaitFor(_IsDone, 600) 90 util.WaitFor(_IsDone, 600)
91 91
92 log = tab.EvaluateJavaScript('document.getElementById("log").innerHTML') 92 log = tab.EvaluateJavaScript('document.getElementById("log").innerHTML')
93 93
94 for line in log.splitlines(): 94 for line in log.splitlines():
95 if not line.startswith('values '): 95 if not line.startswith('values '):
96 continue 96 continue
97 parts = line.split() 97 parts = line.split()
98 values = [float(v.replace(',', '')) for v in parts[1:-1]] 98 values = [float(v.replace(',', '')) for v in parts[1:-1]]
99 units = parts[-1] 99 units = parts[-1]
100 metric = page.display_url.split('.')[0].replace('/', '_') 100 metric = page.display_name.split('.')[0].replace('/', '_')
101 results.Add(metric, units, values) 101 results.Add(metric, units, values)
102 break 102 break
103 103
104 print log 104 print log
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698