blob: 466a867351bcfbf29fd8055ce0281264a41ffe9c [file] [log] [blame]
<html>
<head>
<title>Chromium Target Build Times</title>
<script src="ui/js/common.js"></script>
<script language="javascript">
var perf_url = 'http://build.chromium.org/f/chromium/perf/';
var targets_url = perf_url + 'dashboard/targets.html';
function DisplayGraph(name, graph) {
document.write('<td><iframe scrolling="no" height="250" width="400" src="' + perf_url);
document.write(name);
document.write('/report.html?history=50')
var params = ParseParams();
if (typeof graph == 'undefined') {
if ('graph' in params) {
graph = escape(params.graph);
}
} else if (graph != null) {
document.write('&header=');
document.write(graph);
}
if (graph != null) {
document.write('&graph=');
document.write(graph);
}
document.write('&lookout=1"></iframe></td>');
}
</script>
</head>
<body>
<center>
<h1>Chromium Target Build Times</h1>
<script language="javascript">
var params = ParseParams();
var graph_list = {};
var graphs_received = 0;
var pt_list = {};
var platform_list = []
if ('platform' in params) {
platform_list = params.platform.split(',');
} else {
// platform_list = ['linux', 'mac', 'win'];
platform_list = ['linux', 'win'];
}
function report_error(error) {
document.write("<p>Error: " + error + "</p>");
}
function jsonToJs(data) {
return eval('(' + data + ')')
}
function received_graph_list(data, error) {
for (var index=0; index < graph_list.length; index++) {
var graph = graph_list[index];
target_list.push(escape(graph.name));
}
}
function receive_graph_list_for_platform(platform) {
var received_platform = platform;
function receive_graph_list(data, error) {
if (error) {
report_error(error);
return;
}
graph_list[received_platform] = jsonToJs(data);
graphs_received += 1;
if (graphs_received >= platform_list.length) {
write_table();
}
}
return receive_graph_list;
}
for (var index=0; index < platform_list.length; index++) {
var platform = escape(platform_list[index]);
Fetch('../'+platform+'-targets/targets/graphs.dat',
receive_graph_list_for_platform(platform));
}
function write_table() {
var all_target_list = [];
document.write('<table>');
document.write('<tr><th>&nbsp;</th>');
for (var index=0; index < platform_list.length; index++) {
var platform = escape(platform_list[index]);
document.write('<th><a href="' + targets_url +
'?platform='+platform+'">'+platform+'</a></th>');
var graphs = graph_list[platform];
pt_list[platform] = {};
for (var gindex = 0; gindex < graphs.length; gindex++) {
var name = escape(graphs[gindex].name);
var target_name = escape(graphs[gindex].name);
pt_list[platform][target_name] = 1;
if (all_target_list.indexOf(name) < 0) {
all_target_list.push(target_name);
}
}
}
var target_list = []
if ('target' in params) {
target_list = params.target.split(',');
} else {
target_list = all_target_list;
target_list.sort();
}
document.write('</tr>');
for (tindex = 0; tindex < target_list.length; tindex++) {
var target = escape(target_list[tindex]);
document.write('<tr><th><a href="' + targets_url +
'?target='+target+'">'+target+'</a></th>');
for (pindex = 0; pindex < platform_list.length; pindex++) {
var platform = escape(platform_list[pindex]);
//if (pt_list[platform][target] == 1) {
if (typeof pt_list[platform][target] != 'undefined') {
DisplayGraph(platform+'-targets/targets', target);
} else {
document.write('<td align="center" valign="center">no ' + target + ' data on ' + platform + '</td>');
}
}
document.write('</tr>');
}
document.write('</table>');
}
</script>
</center>
</body>
</html>