OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <title>V8 Benchmark Suite</title> | 3 <title>V8 Benchmark Suite</title> |
4 <script type="text/javascript" src="base.js"></script> | 4 <script type="text/javascript" src="base.js"></script> |
5 <script type="text/javascript" src="richards.js"></script> | 5 <script type="text/javascript" src="richards.js"></script> |
6 <script type="text/javascript" src="deltablue.js"></script> | 6 <script type="text/javascript" src="deltablue.js"></script> |
7 <script type="text/javascript" src="crypto.js"></script> | 7 <script type="text/javascript" src="crypto.js"></script> |
8 <script type="text/javascript" src="raytrace.js"></script> | 8 <script type="text/javascript" src="raytrace.js"></script> |
9 <script type="text/javascript" src="earley-boyer.js"></script> | 9 <script type="text/javascript" src="earley-boyer.js"></script> |
10 <link type="text/css" rel="stylesheet" href="style.css"></link> | 10 <link type="text/css" rel="stylesheet" href="style.css"></link> |
11 <script type="text/javascript"> | 11 <script type="text/javascript"> |
12 var completed = 0; | 12 var completed = 0; |
13 var benchmarks = BenchmarkSuite.CountBenchmarks(); | 13 var benchmarks = BenchmarkSuite.CountBenchmarks(); |
14 var success = true; | 14 var success = true; |
15 | 15 |
16 function ShowProgress(name) { | 16 function ShowProgress(name) { |
17 var status = document.getElementById("status"); | 17 var status = document.getElementById("status"); |
18 var percentage = ((++completed) / benchmarks) * 100; | 18 var percentage = ((++completed) / benchmarks) * 100; |
19 status.innerHTML = "Running: " + Math.round(percentage) + "% completed."; | 19 status.innerHTML = "Running: " + Math.round(percentage) + "% completed."; |
20 } | 20 } |
21 | 21 |
22 | 22 |
23 function AddResult(name, result) { | 23 function AddResult(name, result) { |
24 var text = name + ': ' + formatScore(result); | 24 var text = name + ': ' + result; |
25 var results = document.getElementById("results"); | 25 var results = document.getElementById("results"); |
26 results.innerHTML += (text + "<br/>"); | 26 results.innerHTML += (text + "<br/>"); |
27 } | 27 } |
28 | 28 |
29 | 29 |
30 function AddError(name, error) { | 30 function AddError(name, error) { |
31 AddResult(name, '<b>error</b>'); | 31 AddResult(name, '<b>error</b>'); |
32 success = false; | 32 success = false; |
33 } | 33 } |
34 | 34 |
35 | 35 |
36 function AddScore(score) { | 36 function AddScore(score) { |
37 var status = document.getElementById("status"); | 37 var status = document.getElementById("status"); |
38 if (success) { | 38 if (success) { |
39 status.innerHTML = "Score: " + formatScore(score); | 39 status.innerHTML = "Score: " + score; |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 | 43 |
44 function Run() { | 44 function Run() { |
45 BenchmarkSuite.RunSuites({ NotifyStep: ShowProgress, | 45 BenchmarkSuite.RunSuites({ NotifyStep: ShowProgress, |
46 NotifyError: AddError, | 46 NotifyError: AddError, |
47 NotifyResult: AddResult, | 47 NotifyResult: AddResult, |
48 NotifyScore: AddScore }); | 48 NotifyScore: AddScore }); |
49 } | 49 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 <div id="status" style="text-align: center; margin-top: 75px; font-size: 120%;
font-weight: bold;">Starting...</div> | 89 <div id="status" style="text-align: center; margin-top: 75px; font-size: 120%;
font-weight: bold;">Starting...</div> |
90 <div style="text-align: left; margin: 30px 0 0 90px;" id="results"> | 90 <div style="text-align: left; margin: 30px 0 0 90px;" id="results"> |
91 <div> | 91 <div> |
92 </div> | 92 </div> |
93 </td></tr></table> | 93 </td></tr></table> |
94 | 94 |
95 </div> | 95 </div> |
96 | 96 |
97 </body> | 97 </body> |
98 </html> | 98 </html> |
OLD | NEW |