| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 | 73 |
| 74 // Keep track of all declared benchmark suites. | 74 // Keep track of all declared benchmark suites. |
| 75 BenchmarkSuite.suites = []; | 75 BenchmarkSuite.suites = []; |
| 76 | 76 |
| 77 | 77 |
| 78 // Scores are not comparable across versions. Bump the version if | 78 // Scores are not comparable across versions. Bump the version if |
| 79 // you're making changes that will affect that scores, e.g. if you add | 79 // you're making changes that will affect that scores, e.g. if you add |
| 80 // a new benchmark or change an existing one. | 80 // a new benchmark or change an existing one. |
| 81 BenchmarkSuite.version = '1'; | 81 BenchmarkSuite.version = '1.5'; |
| 82 | 82 |
| 83 BenchmarkSuite.run_model = "repeated"; | 83 BenchmarkSuite.run_model = "repeated"; |
| 84 | 84 |
| 85 // To make the benchmark results predictable, we replace Math.random | 85 // To make the benchmark results predictable, we replace Math.random |
| 86 // with a 100% deterministic alternative. | 86 // with a 100% deterministic alternative. |
| 87 Math.random = (function() { | 87 Math.random = (function() { |
| 88 var seed = 49734321; | 88 var seed = 49734321; |
| 89 return function() { | 89 return function() { |
| 90 // Robert Jenkins' 32 bit integer hash function. | 90 // Robert Jenkins' 32 bit integer hash function. |
| 91 seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff; | 91 seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } catch (e) { | 283 } catch (e) { |
| 284 suite.NotifyError(e); | 284 suite.NotifyError(e); |
| 285 return null; | 285 return null; |
| 286 } | 286 } |
| 287 return RunNextSetup; | 287 return RunNextSetup; |
| 288 } | 288 } |
| 289 | 289 |
| 290 // Start out running the setup. | 290 // Start out running the setup. |
| 291 return RunNextSetup(); | 291 return RunNextSetup(); |
| 292 } | 292 } |
| OLD | NEW |