| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 """Runs Apple's JetStream benchmark. | 5 """Runs Apple's JetStream benchmark. |
| 6 | 6 |
| 7 JetStream combines a variety of JavaScript benchmarks, covering a variety of | 7 JetStream combines a variety of JavaScript benchmarks, covering a variety of |
| 8 advanced workloads and programming techniques, and reports a single score that | 8 advanced workloads and programming techniques, and reports a single score that |
| 9 balances them using geometric mean. | 9 balances them using geometric mean. |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 for k, v in result.iteritems(): | 62 for k, v in result.iteritems(): |
| 63 results.Add(k.replace('.', '_'), 'score', v['result'], | 63 results.Add(k.replace('.', '_'), 'score', v['result'], |
| 64 data_type='unimportant') | 64 data_type='unimportant') |
| 65 # Collect all test scores to compute geometric mean. | 65 # Collect all test scores to compute geometric mean. |
| 66 all_scores.extend(v['result']) | 66 all_scores.extend(v['result']) |
| 67 total = statistics.GeometricMean(all_scores) | 67 total = statistics.GeometricMean(all_scores) |
| 68 results.AddSummaryValue( | 68 results.AddSummaryValue( |
| 69 scalar.ScalarValue(None, 'Score', 'score', total)) | 69 scalar.ScalarValue(None, 'Score', 'score', total)) |
| 70 | 70 |
| 71 | 71 |
| 72 @test.Disabled('android') # Crashes on GN. | 72 @test.Disabled('android', 'xp') # crbug.com/381742 |
| 73 @test.Disabled('xp') # Crashes on Win XP. See crbug.com/381742 for an example. | |
| 74 class Jetstream(test.Test): | 73 class Jetstream(test.Test): |
| 75 test = _JetstreamMeasurement | 74 test = _JetstreamMeasurement |
| 76 | 75 |
| 77 def CreatePageSet(self, options): | 76 def CreatePageSet(self, options): |
| 78 ps = page_set.PageSet( | 77 ps = page_set.PageSet( |
| 79 archive_data_file='../page_sets/data/jetstream.json', | 78 archive_data_file='../page_sets/data/jetstream.json', |
| 80 make_javascript_deterministic=False, | 79 make_javascript_deterministic=False, |
| 81 file_path=os.path.abspath(__file__)) | 80 file_path=os.path.abspath(__file__)) |
| 82 ps.AddPageWithDefaultRunNavigate('http://browserbench.org/JetStream/') | 81 ps.AddPageWithDefaultRunNavigate('http://browserbench.org/JetStream/') |
| 83 return ps | 82 return ps |
| OLD | NEW |