blob: 51c9ad3ae333705b839528ef47f8cd06cb592056 [file] [log] [blame]
<html>
<head>
<title>NaCl Perf (Matrix View)</title>
<script src="ui/js/common.js"></script>
<script language="javascript">
var perf_url = "http://build.chromium.org/f/client/perf/"; //DirName(DirName(window.location.href));
function DisplayGraph(name, heighth, width, thumbnail, graph) {
document.write('<td><iframe scrolling="no"');
document.write(' height="' + heighth + '" width="' + width + '"');
document.write(' src="' + perf_url);
document.write('/' + name + '/report.html?history=50');
var params = ParseParams();
if (typeof graph == 'undefined') {
if ('graph' in params) {
graph = escape(params.graph);
}
document.write('&header=');
} else if (graph != null) {
document.write('&header=');
document.write(graph);
}
if (graph != null) {
document.write('&graph=');
document.write(graph);
}
if (thumbnail) {
document.write('&thumbnail');
}
document.write('&lookout=1"></iframe></td>');
}
</script>
</head>
<body>
<center>
<script language="javascript">
var params = ParseParams();
var builder_map = {
// Leaving out glibc for now, otherwise the graphs are squished...
'NaCl XP Newlib': 'nacl-xp-bare-newlib-opt',
// 'NaCl XP Glibc': 'nacl-xp-bare-glibc-opt',
'NaCl Win 7 32 Newlib': 'nacl-win7-32-bare-newlib-opt',
// 'NaCl Win 7 32 Glibc': 'nacl-win7-32-bare-glibc-opt',
'NaCl Win 7 64 Newlib': 'nacl-win7-64-bare-newlib-opt',
// 'NaCl Win 7 64 Glibc': 'nacl-win7-64-bare-glibc-opt',
'NaCl Mac 10.5 Newlib': 'nacl-mac10.5-newlib-opt',
// 'NaCl Mac 10.5 Glibc': 'nacl-mac10.5-glibc-opt',
'NaCl Mac 10.6 Newlib': 'nacl-mac10.6-newlib-opt',
// 'NaCl Mac 10.6 Glibc': 'nacl-mac10.6-glibc-opt',
'NaCl Mac 10.7 Newlib': 'nacl-mac10.7-newlib-opt',
// 'NaCl Mac 10.7 Glibc': 'nacl-mac10.7-glibc-opt',
'NaCl Lucid 32 Newlib': 'nacl-lucid-32-bare-newlib-opt',
// 'NaCl Lucid 32 Glibc': 'nacl-lucid-32-bare-glibc-opt',
'NaCl Lucid 64 Newlib': 'nacl-lucid-64-bare-newlib-opt',
// 'NaCl Lucid 64 Glibc': 'nacl-lucid-64-bare-glibc-opt',
};
var test_map = {
'browser_startup_time.out': 'Browser Startup Time',
'browser_startup_size.out': 'Size of Nexe for Browser',
'hello_world_size.out': 'Size of Commandline Hello World',
};
if ('builder' in params) {
builder_list = params.builder.split(',');
} else {
builder_list = Keys(builder_map);
}
if ('test' in params) {
test_list = params.test.split(',');
} else {
test_list = Keys(test_map);
}
// NOTE: This is changed from perf.html in that "test" now
// refers to the graph name, while the original definition of
// "test" is hard coded as "nacl-perf".
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 + '/nacl-perf', 250, 400, false, test);
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>' +
escape(builder).replace('%20', ' ') + '</p></th>');
}
document.write('</tr><tr>');
for (var bidx in row) {
builder_id = builder_map[row[bidx]];
DisplayGraph(builder_id + '/nacl-perf', 250, 400, true, test);
}
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_overview_header_row() {
document.write('<tr><th>&nbsp;</th>');
for (var bindex=0; bindex < builder_list.length; bindex++) {
builder = builder_list[bindex];
url = MakeURL({'builder':escape(builder)});
document.write('<th align="center"><a href="' + url + '">'
+ escape(builder).replace('%20', ' ') + '</a></th>');
}
document.write('</tr>');
}
function write_overview_table() {
document.write('<table>');
var width = document.body.scrollWidth / (builder_list.length + 2);
for (var tindex=0; tindex < test_list.length; tindex++) {
// Write a header every four rows for navigability.
// TODO: Use more sophisticated freezing of the header rows?
if ((tindex % 4) == 0) {
write_overview_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 + '/nacl-perf', 250, width, true, test)
}
document.write('<th valign="center"><a href="' + url + '">'
+ test_name + '</a></th>');
document.write('</tr>');
}
write_overview_header_row();
document.write('</table>');
}
function write_header(header_string, url_string) {
document.write('<h1><a href="' + window.location.pathname + '">'
+ 'NaCl Perf</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 (url_string == '') {
// Only provide a link back to classic on the matrix page,
// not on the individual pages it can't handle.
document.write('<p>(<a href="nacl-overview.html'
+ window.location.search
+ '">classic view</a>)</p>');
}
document.write(
'<p>[ <a href="nacl-perf.html' +
url_string + '">overview</a> ]</p>');
}
if (builder_list.length == 1) {
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>