Skip to content

Commit 6f13c2a

Browse files
authored
Merge pull request #913 from rylev/format
Format html
2 parents 73783d9 + 572fb7b commit 6f13c2a

File tree

7 files changed

+778
-718
lines changed

7 files changed

+778
-718
lines changed

site/static/bootstrap.html

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!doctype html>
22
<html>
3+
34
<head>
45
<meta charset="utf-8">
56
<link rel="stylesheet" href="uPlot.min.css">
@@ -42,6 +43,7 @@
4243
white-space: pre;
4344
font-family: monospace;
4445
}
46+
4547
body {
4648
padding: 1em;
4749
margin: 0;
@@ -51,10 +53,12 @@
5153
<script src="shared.js"></script>
5254
<title>rustc performance data</title>
5355
</head>
56+
5457
<body>
5558
<div>&gt; <a href="index.html">graphs</a>, <a href="compare.html">compare</a>,
5659
<a href="dashboard.html">dashboard</a>, <a href="bootstrap.html">bootstrap</a>,
57-
<a href="status.html">status</a>, <a href="help.html">help</a>.</div>
60+
<a href="status.html">status</a>, <a href="help.html">help</a>.
61+
</div>
5862
<div id="settings">
5963
start: <input placeholder="yyyy-mm-dd or commit" id="start-bound" />
6064
end: <input placeholder="yyyy-mm-dd or commit" id="end-bound" />
@@ -64,15 +68,21 @@
6468
See <a href="/compare.html">compare page</a> for descriptions of what
6569
the names mean.
6670
</div>
67-
<div id="loading"><h2>Loading &amp; rendering data..</h2><h3>This may take a while!</h3></div>
71+
<div id="loading">
72+
<h2>Loading &amp; rendering data..</h2>
73+
<h3>This may take a while!</h3>
74+
</div>
6875
<div id="charts"></div>
6976
<div id="as-of"></div>
7077
<a href="https://github.com/rust-lang-nursery/rustc-perf">
71-
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
78+
<img style="position: absolute; top: 0; right: 0; border: 0;"
79+
src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
80+
alt="Fork me on GitHub"
81+
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
7282
</a>
7383

7484
<script>
75-
function tooltipPlugin({onclick, commits, shiftX = 10, shiftY = 10}) {
85+
function tooltipPlugin({ onclick, commits, shiftX = 10, shiftY = 10 }) {
7686
let tooltipLeftOffset = 0;
7787
let tooltipTopOffset = 0;
7888

@@ -108,16 +118,16 @@
108118
showTooltip();
109119

110120
let top = u.valToPos(u.data[seriesIdx][dataIdx], 'y');
111-
let lft = u.valToPos(u.data[ 0][dataIdx], 'x');
121+
let lft = u.valToPos(u.data[0][dataIdx], 'x');
112122

113-
tooltip.style.top = (tooltipTopOffset + top + shiftX) + "px";
123+
tooltip.style.top = (tooltipTopOffset + top + shiftX) + "px";
114124
tooltip.style.left = (tooltipLeftOffset + lft + shiftY) + "px";
115125

116126
tooltip.textContent = (
117127
fmtDate(new Date(u.data[0][dataIdx] * 1e3)) + " - " +
118-
commits[dataIdx][1].slice(0,10) + "\n" +
128+
commits[dataIdx][1].slice(0, 10) + "\n" +
119129
u.series[seriesIdx].label + ": " +
120-
u.data[seriesIdx][dataIdx]/1e9 + " seconds"
130+
u.data[seriesIdx][dataIdx] / 1e9 + " seconds"
121131
);
122132
}
123133

@@ -177,7 +187,7 @@
177187
};
178188
}
179189

180-
function genPlotOpts({title, width, height, yAxisLabel, series, commits, alpha = 0.3, prox = 5}) {
190+
function genPlotOpts({ title, width, height, yAxisLabel, series, commits, alpha = 0.3, prox = 5 }) {
181191
return {
182192
title,
183193
width,
@@ -199,20 +209,20 @@
199209
},
200210
},
201211
axes: [
202-
{ },
212+
{},
203213
{
204214
label: yAxisLabel,
205215
space: 24,
206216
values: (self, splits) => {
207-
return splits.map(v => v/1e9 + " sec");
217+
return splits.map(v => v / 1e9 + " sec");
208218
},
209219
},
210220
],
211221
plugins: [
212222
tooltipPlugin({
213223
onclick(u, seriesIdx, dataIdx) {
214224
let thisCommit = commits[dataIdx][1];
215-
let prevCommit = (commits[dataIdx-1] || [null,null])[1];
225+
let prevCommit = (commits[dataIdx - 1] || [null, null])[1];
216226
window.open(`/compare.html?start=${prevCommit}&end=${thisCommit}`);
217227
},
218228
commits,
@@ -280,4 +290,5 @@
280290
});
281291
</script>
282292
</body>
283-
</html>
293+
294+
</html>

0 commit comments

Comments
 (0)