OLD | NEW |
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 Loading... |
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 |
OLD | NEW |