diff options
author | Steven Knight <knight@baldmt.com> | 2009-12-18 08:03:50 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2009-12-18 08:03:50 (GMT) |
commit | 66d0823dd960afe9cf45c910d2fcedea133c6fef (patch) | |
tree | 6e1f3e3dd9a03cf38faa62500cd224b751d27905 /timings/index.html | |
parent | a158bdde183073bb22007d08b4a7cfa1163f082a (diff) | |
download | SCons-66d0823dd960afe9cf45c910d2fcedea133c6fef.zip SCons-66d0823dd960afe9cf45c910d2fcedea133c6fef.tar.gz SCons-66d0823dd960afe9cf45c910d2fcedea133c6fef.tar.bz2 |
Move the timings-specific pieces of the buildbot infrastructure into
the trunk/timings directory. We'll map them into the buildbot directory
using svn:externals. This will let us keep all the pieces of a timing
configuration, including its buildbot pieces, in one place, and will
let us simplify the Master initialization (since it will be able to look
on-disk for the configurations for which it should set up buildbot steps,
instead of querying the SVN server).
Diffstat (limited to 'timings/index.html')
-rw-r--r-- | timings/index.html | 196 |
1 files changed, 196 insertions, 0 deletions
diff --git a/timings/index.html b/timings/index.html new file mode 100644 index 0000000..de102ea --- /dev/null +++ b/timings/index.html @@ -0,0 +1,196 @@ +<html> + <head> + <title>SCons Timings</title> + <script src="js/common.js"></script> + <script language="javascript"> + var perf_url = DirName(window.location.href); + function DisplayGraph(name, heighth, width, thumbnail, graph) { + var params = ParseParams(); + var url = perf_url + '/' + name + '/graph.html' + + '?history=50' + + '&lookout'; + //var debug = url; + var debug = ''; + if (typeof graph == 'undefined') { + if ('graph' in params) { + graph = params.graph; + } + url += '&header='; + } else if (graph != null) { + url += '&header=' + graph; + } + if (graph != null) { + url += '&graph=' + graph; + } + if (thumbnail) { + url += '&thumbnail'; + } + document.write('<td>' + debug + '<iframe' + + //' scrolling="no"' + + ' height="' + heighth + '"' + + ' width="' + width + '"' + + ' src="' + url + '">' + + '</iframe></td>'); + } + </script> + </head> + <body> + <center> + <script language="javascript"> + var params = ParseParams(); + // TODO: parameterize these in a .dat file + var builder_map = { + 'Ubuntu': 'ubuntu-timings', + }; + var graphs_map = { + 'Performance': 'TimeSCons-elapsed', + 'Memory': 'memory-final', + }; + var test_map = { + 'CPPPATH': 'CPPPATH', + 'JTimer': 'JTimer', + 'hundred': 'hundred', + }; + if ('builder' in params) { + builder_list = params.builder.split(','); + } else { + builder_list = Keys(builder_map); + } + if ('graph' in params) { + graphs_list = param.graph.split(','); + } else { + graphs_list = Keys(graphs_map); + } + if ('test' in params) { + test_list = params.test.split(','); + } else { + test_list = Keys(test_map); + } + function write_builder_table() { + document.write('<table><tr>'); + for (var tindex=0; tindex < test_list.length; tindex++) { + test = test_list[tindex]; + test_name = test_map[test]; + DisplayGraph(builder_id + '/' + test, 250, 400, false); + DisplayGraph(builder_id + '/' + test, 250, 400, false); + if ((tindex % 3) == 2) { + document.write('</tr><tr>'); + } + } + document.write('</tr></table>'); + } + function write_test_table() { + document.write('<table>'); + row = []; + function write_row(row) { + document.write('<tr>'); + for (var bidx in row) { + builder = row[bidx]; + document.write('<th align="center"><p><br>' + + builder + '</p></th>'); + } + document.write('</tr><tr>'); + for (var bidx in row) { + builder_id = builder_map[row[bidx]]; + DisplayGraph(builder_id + '/' + test, 250, 400, true); + } + document.write('</tr>'); + } + for (var bindex=0; bindex < builder_list.length; bindex++) { + builder = builder_list[bindex]; + row.push(builder) + if ((bindex % 3) == 2) { + write_row(row); + row = []; + } + } + if (row.length > 0) { + write_row(row); + } + document.write('</table>'); + } + function write_builders_header_row() { + document.write('<tr><th> </th>'); + for (var bindex=0; bindex < builder_list.length; bindex++) { + builder = builder_list[bindex]; + url = MakeURL({'builder':escape(builder)}); + var s ='<th align="center" colspan="' + + graphs_list.length + + '">' + + '<a href="' + url + '">' + + builder + + '</a></th>'; + document.write(s); + } + document.write('</tr>'); + } + function write_graphs_header_row() { + document.write('<tr><th> </th>'); + for (var bindex=0; bindex < builder_list.length; bindex++) { + for (var gindex=0; gindex < graphs_list.length; gindex++) { + graph = graphs_list[gindex]; + document.write('<th align="center">' + graph + '</th>'); + } + } + } + function write_overview_table() { + document.write('<table>'); + var width = document.body.scrollWidth / (builder_list.length + 2); + write_builders_header_row(); + for (var tindex=0; tindex < test_list.length; tindex++) { + // Write a graphs header every four rows for navigability. + // TODO: Use more sophisticated freezing of the header rows? + if ((tindex % 4) == 0) { + write_graphs_header_row(); + } + test = test_list[tindex]; + test_name = test_map[test]; + document.write('<tr>'); + url = MakeURL({'test':escape(test)}); + document.write('<th valign="center"><a href="' + url + '">' + + test_name + '</a></th>'); + for (var bindex=0; bindex < builder_list.length; bindex++) { + builder = builder_list[bindex]; + builder_id = builder_map[builder]; + DisplayGraph(builder_id + '/' + test, 250, width, true, "TimeSCons-elapsed") + DisplayGraph(builder_id + '/' + test, 250, width, true, "memory-final") + } + document.write('<th valign="center"><a href="' + url + '">' + + test_name + '</a></th>'); + document.write('</tr>'); + } + write_graphs_header_row(); + write_builders_header_row(); + document.write('</table>'); + } + function write_header(header_string, url_string) { + document.write('<h1><a href="' + window.location.pathname + '">' + + 'SCons Timings</a>'); + if (header_string) { + document.write(': ' + header_string); + } + if ('graph' in params) { + document.write(': ' + escape(params.graph)) + } else { + document.write(': overview'); + } + document.write('</h1>'); + } + if (builder_list.length == 0) { + builder = builder_list[0]; + builder_id = builder_map[builder]; + write_header(builder, '&builder=' + escape(builder)); + write_builder_table() + } else if (test_list.length == 1) { + test = test_list[0]; + test_name = test_map[test]; + write_header(test_name, '&test=' + escape(test)); + write_test_table() + } else { + write_header('', ''); + write_overview_table(); + } + </script> + </center> + </body> +</html> |