OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 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 """PeaceKeeper benchmark suite. | 5 """PeaceKeeper benchmark suite. |
6 | 6 |
7 Peacekeeper measures browser's performance by testing its JavaScript | 7 Peacekeeper measures browser's performance by testing its JavaScript |
8 functionality. JavaScript is a widely used programming language used in the | 8 functionality. JavaScript is a widely used programming language used in the |
9 creation of modern websites to provide features such as animation, navigation, | 9 creation of modern websites to provide features such as animation, navigation, |
10 forms and other common requirements. By measuring a browser's ability to handle | 10 forms and other common requirements. By measuring a browser's ability to handle |
11 commonly used JavaScript functions Peacekeeper can evaluate its performance. | 11 commonly used JavaScript functions Peacekeeper can evaluate its performance. |
12 Peacekeeper scores are measured in operations per second or rendered frames per | 12 Peacekeeper scores are measured in operations per second or rendered frames per |
13 second depending on the test. Final Score is computed by calculating geometric | 13 second depending on the test. Final Score is computed by calculating geometric |
14 mean of individual tests scores. | 14 mean of individual tests scores. |
15 """ | 15 """ |
16 | 16 |
17 import os | 17 import os |
18 | 18 |
19 from metrics import statistics | |
20 from telemetry import test | 19 from telemetry import test |
21 from telemetry.page import page_measurement | 20 from telemetry.page import page_measurement |
22 from telemetry.page import page_set | 21 from telemetry.page import page_set |
| 22 from telemetry.util import statistics |
23 from telemetry.value import merge_values | 23 from telemetry.value import merge_values |
24 | 24 |
25 class PeaceKeeperMeasurement(page_measurement.PageMeasurement): | 25 class PeaceKeeperMeasurement(page_measurement.PageMeasurement): |
26 | 26 |
27 def WillNavigateToPage(self, page, tab): | 27 def WillNavigateToPage(self, page, tab): |
28 page.script_to_evaluate_on_commit = """ | 28 page.script_to_evaluate_on_commit = """ |
29 var __results = {}; | 29 var __results = {}; |
30 var _done = false; | 30 var _done = false; |
31 var __real_log = window.console.log; | 31 var __real_log = window.console.log; |
32 var test_frame = null; | 32 var test_frame = null; |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 tag = 'html5' | 248 tag = 'html5' |
249 test_param = ['webglSphere', | 249 test_param = ['webglSphere', |
250 'gamingSpitfire', | 250 'gamingSpitfire', |
251 'videoCodecH264', | 251 'videoCodecH264', |
252 'videoCodecTheora', | 252 'videoCodecTheora', |
253 'videoCodecWebM', | 253 'videoCodecWebM', |
254 'videoPosterSupport', | 254 'videoPosterSupport', |
255 'workerContrast01', | 255 'workerContrast01', |
256 'workerContrast02' | 256 'workerContrast02' |
257 ] | 257 ] |
OLD | NEW |