Commit | Line | Data |
---|---|---|
54425b14 | 1 | <!DOCTYPE html> |
bb5899c5 DV |
2 | <html> |
3 | <head> | |
10494b48 | 4 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> |
6f091595 | 5 | <title>perf</title> |
bb5899c5 | 6 | <!--[if IE]> |
a2b2c3a1 | 7 | <script type="text/javascript" src="../excanvas.js"></script> |
bb5899c5 | 8 | <![endif]--> |
7e5ddc94 DV |
9 | <!-- |
10 | For production (minified) code, use: | |
11 | <script type="text/javascript" src="dygraph-combined.js"></script> | |
12 | --> | |
13 | <script type="text/javascript" src="../dygraph-dev.js"></script> | |
14 | ||
bb5899c5 DV |
15 | <script type="text/javascript" src="data.js"></script> |
16 | </head> | |
17 | <body> | |
d16579a0 | 18 | <div id="div_g" style="width:600px; height:300px;"></div> |
bb5899c5 DV |
19 | <div id="status"></div> |
20 | ||
21 | <script type="text/javascript"> | |
4cfcc38c | 22 | var num_tests = 250; |
4b38df10 | 23 | var times = []; |
bb5899c5 DV |
24 | var start = new Date; |
25 | ||
26 | for (var i = 0; i < num_tests; i++) { | |
4b38df10 | 27 | var this_start = new Date; |
4cfcc38c DV |
28 | // Calling destroy() here reduces the memory usage in Chrome by |
29 | // ~1.2MB/instantiation. | |
30 | if (i) g.destroy(); | |
bb5899c5 | 31 | g = new Dygraph( |
d16579a0 | 32 | document.getElementById("div_g"), |
bb5899c5 DV |
33 | NoisyData, { |
34 | rollPeriod: 7, | |
35 | errorBars: true | |
36 | } | |
37 | ); | |
4b38df10 DV |
38 | var this_end = new Date; |
39 | times.push([i, this_end - this_start]); | |
bb5899c5 DV |
40 | } |
41 | ||
42 | var end = new Date; | |
43 | ||
44 | document.getElementById("status").innerHTML = "Elapsed time: " + (end - start)/num_tests + " ms/instantiation"; | |
4cfcc38c | 45 | perf = new Dygraph( |
d16579a0 | 46 | document.getElementById("div_g"), |
4b38df10 DV |
47 | times, { |
48 | labels: [ "Iteration", "Time (ms)" ] | |
49 | } | |
50 | ); | |
bb5899c5 | 51 | </script> |
1ac31d4e | 52 | |
ab68ea2d | 53 | <p><b>Some numbers on a MacBook Pro 2.53 GHz Core 2 Duo</b><br/> |
1920a008 RK |
54 | <table border="1"><tbody> |
55 | <tr><td>commit</td><td>Firefox 3.0.15</td><td>Safari 4.0.3</td></tr> | |
56 | <tr><td>bb5899c56e33716db724cb60a5120b91f5fccdeb</td> | |
57 | <td>28 ms/instantiation</td> | |
58 | <td>15.02 ms/instantiation</td></tr> | |
59 | <tr><td>2847c1cf1a2874e9fe56b5749e6e105e37bb086a</td> | |
60 | <td>49.27 ms/instantiation</td> | |
61 | <td>24.48 ms/instantiation</td></tr> | |
62 | </tbody></table> | |
1ac31d4e | 63 | </p> |
bb5899c5 DV |
64 | </body> |
65 | </html> |