-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
48 lines (42 loc) · 1.66 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
table {
border-collapse: collapse;
border: 2px black solid;
font: 12px sans-serif;
}
td {
border: 1px black solid;
padding: 5px;
}
</style>
</head>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script type="text/javascript"charset="utf-8">
function renderTable(name, header) {
d3.text(name, function(data) {
var parsedCSV = d3.dsv("|").parseRows(data);
var table = d3.select("body").append("p").text(name).append("table");
table.append("thead").append("tr")
.selectAll("th")
.data(header).enter()
.append("th")
.text(function(d) { return d; });
table.append("tbody").selectAll("tr")
.data(parsedCSV).enter()
.append("tr")
.selectAll("td")
.data(function(d) { return d; }).enter()
.append("td")
.text(function(d) { return d; });
});
}
renderTable("run.csv", ["SM Version","Implementation","Cluster Id","Benchmark","Scale","Parameters","Runs","Status","Start","End"]);
renderTable("test_run.csv", ["Time","Query","Iteration","Status","Error code","Error msg","Elapsed"]);
</script>
</body>
</html>