OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <title>NaCl Perf (Matrix View)</title> | |
4 <script src="ui/js/common.js"></script> | |
5 <script language="javascript"> | |
6 var perf_url = "http://build.chromium.org/f/client/perf/"; //DirName(DirNa
me(window.location.href)); | |
7 function DisplayGraph(name, heighth, width, thumbnail, graph) { | |
8 document.write('<td><iframe scrolling="no"'); | |
9 document.write(' height="' + heighth + '" width="' + width + '"'); | |
10 document.write(' src="' + perf_url); | |
11 document.write('/' + name + '/report.html?history=50'); | |
12 var params = ParseParams(); | |
13 if (typeof graph == 'undefined') { | |
14 if ('graph' in params) { | |
15 graph = escape(params.graph); | |
16 } | |
17 document.write('&header='); | |
18 } else if (graph != null) { | |
19 document.write('&header='); | |
20 document.write(graph); | |
21 } | |
22 if (graph != null) { | |
23 document.write('&graph='); | |
24 document.write(graph); | |
25 } | |
26 if (thumbnail) { | |
27 document.write('&thumbnail'); | |
28 } | |
29 document.write('&lookout=1"></iframe></td>'); | |
30 } | |
31 </script> | |
32 </head> | |
33 <body> | |
34 <center> | |
35 <script language="javascript"> | |
36 var params = ParseParams(); | |
37 var builder_map = { | |
38 // Leaving out glibc for now, otherwise the graphs are squished... | |
39 'NaCl XP Newlib': 'nacl-xp-bare-newlib-opt', | |
40 // 'NaCl XP Glibc': 'nacl-xp-bare-glibc-opt', | |
41 'NaCl Win 7 32 Newlib': 'nacl-win7-32-bare-newlib-opt', | |
42 // 'NaCl Win 7 32 Glibc': 'nacl-win7-32-bare-glibc-opt', | |
43 'NaCl Win 7 64 Newlib': 'nacl-win7-64-bare-newlib-opt', | |
44 // 'NaCl Win 7 64 Glibc': 'nacl-win7-64-bare-glibc-opt', | |
45 'NaCl Mac 10.5 Newlib': 'nacl-mac10.5-newlib-opt', | |
46 // 'NaCl Mac 10.5 Glibc': 'nacl-mac10.5-glibc-opt', | |
47 'NaCl Mac 10.6 Newlib': 'nacl-mac10.6-newlib-opt', | |
48 // 'NaCl Mac 10.6 Glibc': 'nacl-mac10.6-glibc-opt', | |
49 'NaCl Mac 10.7 Newlib': 'nacl-mac10.7-newlib-opt', | |
50 // 'NaCl Mac 10.7 Glibc': 'nacl-mac10.7-glibc-opt', | |
51 'NaCl Lucid 32 Newlib': 'nacl-lucid-32-bare-newlib-opt', | |
52 // 'NaCl Lucid 32 Glibc': 'nacl-lucid-32-bare-glibc-opt', | |
53 'NaCl Lucid 64 Newlib': 'nacl-lucid-64-bare-newlib-opt', | |
54 // 'NaCl Lucid 64 Glibc': 'nacl-lucid-64-bare-glibc-opt', | |
55 }; | |
56 var test_map = { | |
57 'browser_startup_time.out': 'Browser Startup Time', | |
58 'browser_startup_size.out': 'Size of Nexe for Browser', | |
59 'hello_world_size.out': 'Size of Commandline Hello World', | |
60 }; | |
61 if ('builder' in params) { | |
62 builder_list = params.builder.split(','); | |
63 } else { | |
64 builder_list = Keys(builder_map); | |
65 } | |
66 if ('test' in params) { | |
67 test_list = params.test.split(','); | |
68 } else { | |
69 test_list = Keys(test_map); | |
70 } | |
71 // NOTE: This is changed from perf.html in that "test" now | |
72 // refers to the graph name, while the original definition of | |
73 // "test" is hard coded as "nacl-perf". | |
74 function write_builder_table() { | |
75 document.write('<table><tr>'); | |
76 for (var tindex=0; tindex < test_list.length; tindex++) { | |
77 test = test_list[tindex]; | |
78 test_name = test_map[test]; | |
79 DisplayGraph(builder_id + '/nacl-perf', 250, 400, false, test); | |
80 if ((tindex % 3) == 2) { | |
81 document.write('</tr><tr>'); | |
82 } | |
83 } | |
84 document.write('</tr></table>'); | |
85 } | |
86 function write_test_table() { | |
87 document.write('<table>'); | |
88 row = []; | |
89 function write_row(row) { | |
90 document.write('<tr>'); | |
91 for (var bidx in row) { | |
92 builder = row[bidx]; | |
93 document.write('<th align="center"><p><br>' + | |
94 escape(builder).replace('%20', ' ') + '</p></th>'); | |
95 } | |
96 document.write('</tr><tr>'); | |
97 for (var bidx in row) { | |
98 builder_id = builder_map[row[bidx]]; | |
99 DisplayGraph(builder_id + '/nacl-perf', 250, 400, true, test); | |
100 } | |
101 document.write('</tr>'); | |
102 } | |
103 for (var bindex=0; bindex < builder_list.length; bindex++) { | |
104 builder = builder_list[bindex]; | |
105 row.push(builder) | |
106 if ((bindex % 3) == 2) { | |
107 write_row(row); | |
108 row = []; | |
109 } | |
110 } | |
111 if (row.length > 0) { | |
112 write_row(row); | |
113 } | |
114 document.write('</table>'); | |
115 } | |
116 function write_overview_header_row() { | |
117 document.write('<tr><th> </th>'); | |
118 for (var bindex=0; bindex < builder_list.length; bindex++) { | |
119 builder = builder_list[bindex]; | |
120 url = MakeURL({'builder':escape(builder)}); | |
121 document.write('<th align="center"><a href="' + url + '">' | |
122 + escape(builder).replace('%20', ' ') + '</a></th>'); | |
123 } | |
124 document.write('</tr>'); | |
125 } | |
126 function write_overview_table() { | |
127 document.write('<table>'); | |
128 var width = document.body.scrollWidth / (builder_list.length + 2); | |
129 for (var tindex=0; tindex < test_list.length; tindex++) { | |
130 // Write a header every four rows for navigability. | |
131 // TODO: Use more sophisticated freezing of the header rows? | |
132 if ((tindex % 4) == 0) { | |
133 write_overview_header_row(); | |
134 } | |
135 test = test_list[tindex]; | |
136 test_name = test_map[test]; | |
137 document.write('<tr>'); | |
138 url = MakeURL({'test':escape(test)}); | |
139 document.write('<th valign="center"><a href="' + url + '">' | |
140 + test_name + '</a></th>'); | |
141 for (var bindex=0; bindex < builder_list.length; bindex++) { | |
142 builder = builder_list[bindex]; | |
143 builder_id = builder_map[builder]; | |
144 DisplayGraph(builder_id + '/nacl-perf', 250, width, true, test) | |
145 } | |
146 document.write('<th valign="center"><a href="' + url + '">' | |
147 + test_name + '</a></th>'); | |
148 document.write('</tr>'); | |
149 } | |
150 write_overview_header_row(); | |
151 document.write('</table>'); | |
152 } | |
153 function write_header(header_string, url_string) { | |
154 document.write('<h1><a href="' + window.location.pathname + '">' | |
155 + 'NaCl Perf</a>'); | |
156 if (header_string) { | |
157 document.write(': ' + header_string); | |
158 } | |
159 if ('graph' in params) { | |
160 document.write(': ' + escape(params.graph)) | |
161 } else { | |
162 document.write(': overview'); | |
163 } | |
164 document.write('</h1>'); | |
165 if (url_string == '') { | |
166 // Only provide a link back to classic on the matrix page, | |
167 // not on the individual pages it can't handle. | |
168 document.write('<p>(<a href="nacl-overview.html' | |
169 + window.location.search | |
170 + '">classic view</a>)</p>'); | |
171 } | |
172 document.write( | |
173 '<p>[ <a href="nacl-perf.html' + | |
174 url_string + '">overview</a> ]</p>'); | |
175 } | |
176 if (builder_list.length == 1) { | |
177 builder = builder_list[0]; | |
178 builder_id = builder_map[builder]; | |
179 write_header(builder, '&builder=' + escape(builder)); | |
180 write_builder_table() | |
181 } else if (test_list.length == 1) { | |
182 test = test_list[0]; | |
183 test_name = test_map[test]; | |
184 write_header(test_name, '&test=' + escape(test)); | |
185 write_test_table() | |
186 } else { | |
187 write_header('', ''); | |
188 write_overview_table(); | |
189 } | |
190 </script> | |
191 </center> | |
192 </body> | |
193 </html> | |
OLD | NEW |