1
0
mirror of https://github.com/golang/go synced 2024-11-19 04:34:39 -07:00
go/dashboard/app/build/perf_learn.html
Dmitriy Vyukov 904c4641c7 dashboard: server app UI changes for performance dashboard
This CL moves code from code.google.com/p/dvyukov-go-perf-dashboard,
which was previously reviewed.

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/96180043
2014-05-13 11:01:50 +04:00

46 lines
1.6 KiB
HTML

<!doctype html>
<html>
<head>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawCharts);
function drawCharts() {
{
{{range $ent := $.Entries}}
var data = new google.visualization.DataTable();
data.addColumn('number', 'idx');
data.addColumn('number', '95%');
data.addColumn({type: 'boolean', role: 'certainty'});
data.addColumn('number', 'signal');
data.addColumn({type: 'boolean', role: 'certainty'});
data.addColumn('number', 'diff');
data.addColumn({type: 'string', role: 'annotation'});
data.addRows([
{{range .Diffs}} [{{.Num}}, {{$ent.BaseVal}}, false, {{$ent.SignalVal}}, false, {{.Val}}, '{{.Hint}}'], {{end}}
]);
new google.visualization.LineChart(document.getElementById('graph{{.Num}}')).
draw(data, {
width: 600,
height: 200,
legend: {position: "none"},
vAxis: {minValue: 0},
chartArea: {left: "10%", top: "1%", width: "90%", height:"95%"}
}
)
{{end}}
}
}
</script>
</head>
<body>
{{range $.Entries}}
<p>
{{.Name}}: base={{printf "%.2f[%d]" .BaseVal .NoiseNum}} signal={{printf "%.2f[%d]" .SignalVal .SignalNum}}
<div id="graph{{.Num}}" width="100px" height="100px"> </div>
</p>
{{end}}
</body>
</html>