3 <title>SCons Timings
</title>
4 <script src=
"js/common.js"></script>
5 <script language=
"javascript">
6 var perf_url
= DirName(window
.location
.href
);
7 function DisplayGraph(name
, heighth
, width
, thumbnail
, graph
) {
8 var params
= ParseParams();
9 var url
= perf_url
+ '/' + name
+ '/graph.html' + '?lookout';
12 if ('history' in params
) {
13 url
+= '&history=' + params
.history
15 if (typeof graph
== 'undefined') {
16 if ('graph' in params
) {
20 } else if (graph
!= null) {
21 url
+= '&header=' + graph
;
24 url
+= '&graph=' + graph
;
29 document
.write('<td>' + debug
+ '<iframe' +
31 ' height="' + heighth
+ '"' +
32 ' width="' + width
+ '"' +
33 ' src="' + url
+ '">' +
40 <script language=
"javascript">
41 var params
= ParseParams();
42 // TODO: parameterize these in a .dat file
44 'Ubuntu': 'ubuntu-timings',
47 'Performance': 'TimeSCons-elapsed',
48 'Memory': 'memory-final',
52 'ElectricCloud': 'ElectricCloud',
57 if ('builder' in params
) {
58 builder_list
= params
.builder
.split(',');
60 builder_list
= Keys(builder_map
);
62 if ('graph' in params
) {
63 graphs_list
= param
.graph
.split(',');
65 graphs_list
= Keys(graphs_map
);
67 if ('test' in params
) {
68 test_list
= params
.test
.split(',');
70 test_list
= Keys(test_map
);
72 function write_builder_table() {
73 document
.write('<table><tr>');
74 for (var tindex
=0; tindex
< test_list
.length
; tindex
++) {
75 test
= test_list
[tindex
];
76 test_name
= test_map
[test
];
77 DisplayGraph(builder_id
+ '/' + test
, 250, 400, false);
78 DisplayGraph(builder_id
+ '/' + test
, 250, 400, false);
79 if ((tindex
% 3) == 2) {
80 document
.write('</tr><tr>');
83 document
.write('</tr></table>');
85 function write_test_table() {
86 document
.write('<table>');
88 function write_row(row
) {
89 document
.write('<tr>');
90 for (var bidx
in row
) {
92 document
.write('<th align="center"><p><br>' +
93 builder
+ '</p></th>');
95 document
.write('</tr><tr>');
96 for (var bidx
in row
) {
97 builder_id
= builder_map
[row
[bidx
]];
98 DisplayGraph(builder_id
+ '/' + test
, 250, 400, true);
100 document
.write('</tr>');
102 for (var bindex
=0; bindex
< builder_list
.length
; bindex
++) {
103 builder
= builder_list
[bindex
];
105 if ((bindex
% 3) == 2) {
110 if (row
.length
> 0) {
113 document
.write('</table>');
115 function write_builders_header_row() {
116 document
.write('<tr><th> </th>');
117 for (var bindex
=0; bindex
< builder_list
.length
; bindex
++) {
118 builder
= builder_list
[bindex
];
119 url
= MakeURL({'builder':escape(builder
)});
120 var s
='<th align="center" colspan="' +
123 '<a href="' + url
+ '">' +
128 document
.write('</tr>');
130 function write_graphs_header_row() {
131 document
.write('<tr><th> </th>');
132 for (var bindex
=0; bindex
< builder_list
.length
; bindex
++) {
133 for (var gindex
=0; gindex
< graphs_list
.length
; gindex
++) {
134 graph
= graphs_list
[gindex
];
135 document
.write('<th align="center">' + graph
+ '</th>');
139 function write_overview_table() {
140 document
.write('<table>');
141 var width
= document
.body
.scrollWidth
/ (builder_list
.length
+ 2);
142 write_builders_header_row();
143 for (var tindex
=0; tindex
< test_list
.length
; tindex
++) {
144 // Write a graphs header every four rows for navigability.
145 // TODO: Use more sophisticated freezing of the header rows?
146 if ((tindex
% 4) == 0) {
147 write_graphs_header_row();
149 test
= test_list
[tindex
];
150 test_name
= test_map
[test
];
151 document
.write('<tr>');
152 url
= MakeURL({'test':escape(test
)});
153 document
.write('<th valign="center"><a href="' + url
+ '">'
154 + test_name
+ '</a></th>');
155 for (var bindex
=0; bindex
< builder_list
.length
; bindex
++) {
156 builder
= builder_list
[bindex
];
157 builder_id
= builder_map
[builder
];
158 DisplayGraph(builder_id
+ '/' + test
, 250, width
, true, "TimeSCons-elapsed")
159 DisplayGraph(builder_id
+ '/' + test
, 250, width
, true, "memory-final")
161 document
.write('<th valign="center"><a href="' + url
+ '">'
162 + test_name
+ '</a></th>');
163 document
.write('</tr>');
165 write_graphs_header_row();
166 write_builders_header_row();
167 document
.write('</table>');
169 function write_header(header_string
, url_string
) {
170 document
.write('<h1><a href="' + window
.location
.pathname
+ '">'
171 + 'SCons Timings</a>');
173 document
.write(': ' + header_string
);
175 if ('graph' in params
) {
176 document
.write(': ' + escape(params
.graph
))
178 document
.write(': overview');
180 document
.write('</h1>');
182 if (builder_list
.length
== 0) {
183 builder
= builder_list
[0];
184 builder_id
= builder_map
[builder
];
185 write_header(builder
, '&builder=' + escape(builder
));
186 write_builder_table()
187 } else if (test_list
.length
== 1) {
189 test_name
= test_map
[test
];
190 write_header(test_name
, '&test=' + escape(test
));
193 write_header('', '');
194 write_overview_table();