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 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 class PeaceKeeperBenchmark(test.Test): | 71 class PeaceKeeperBenchmark(test.Test): |
72 """A base class for Peackeeper benchmarks.""" | 72 """A base class for Peackeeper benchmarks.""" |
73 test = _PeaceKeeperMeasurement | 73 test = _PeaceKeeperMeasurement |
74 | 74 |
75 def CreatePageSet(self, options): | 75 def CreatePageSet(self, options): |
76 """Makes a PageSet for PeaceKeeper benchmarks.""" | 76 """Makes a PageSet for PeaceKeeper benchmarks.""" |
77 # Subclasses are expected to define a class member called query_param. | 77 # Subclasses are expected to define a class member called query_param. |
78 if not hasattr(self, 'test_param'): | 78 if not hasattr(self, 'test_param'): |
79 raise NotImplementedError('test_param not in PeaceKeeper benchmark.') | 79 raise NotImplementedError('test_param not in PeaceKeeper benchmark.') |
80 | 80 |
81 # The docstring of benchmark classes may also be used as a description | |
82 # when 'run_benchmarks list' is run. | |
83 description = self.__doc__ or 'PeaceKeeper Benchmark' | |
84 ps = page_set.PageSet( | 81 ps = page_set.PageSet( |
85 description=description, | |
86 archive_data_file='../page_sets/data/peacekeeper_%s.json' % self.tag, | 82 archive_data_file='../page_sets/data/peacekeeper_%s.json' % self.tag, |
87 make_javascript_deterministic=False) | 83 make_javascript_deterministic=False) |
88 for test_name in self.test_param: | 84 for test_name in self.test_param: |
89 ps.AddPageWithDefaultRunNavigate( | 85 ps.AddPageWithDefaultRunNavigate( |
90 ('http://peacekeeper.futuremark.com/run.action?debug=true&' | 86 ('http://peacekeeper.futuremark.com/run.action?debug=true&' |
91 'repeat=false&forceSuiteName=%s&forceTestName=%s') % | 87 'repeat=false&forceSuiteName=%s&forceTestName=%s') % |
92 (self.tag, test_name)) | 88 (self.tag, test_name)) |
93 return ps | 89 return ps |
94 | 90 |
95 | 91 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 tag = 'html5' | 239 tag = 'html5' |
244 test_param = ['webglSphere', | 240 test_param = ['webglSphere', |
245 'gamingSpitfire', | 241 'gamingSpitfire', |
246 'videoCodecH264', | 242 'videoCodecH264', |
247 'videoCodecTheora', | 243 'videoCodecTheora', |
248 'videoCodecWebM', | 244 'videoCodecWebM', |
249 'videoPosterSupport', | 245 'videoPosterSupport', |
250 'workerContrast01', | 246 'workerContrast01', |
251 'workerContrast02' | 247 'workerContrast02' |
252 ] | 248 ] |
OLD | NEW |