Skip to content

Commit 6bc280e

Browse files
Do not link to self-profile from bootstrap results
1 parent 07753a9 commit 6bc280e

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

site/static/compare.html

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,16 @@ <h3>Commits</h3>
7777
return arr.filter((value, idx) => arr.indexOf(value) == idx);
7878
}
7979

80-
function add_datum_fields(datum, sha, bench, run) {
80+
function add_datum_fields(datum, sha, bench, run, selfProfileAvailable) {
8181
let html = "";
8282
if (datum) {
8383
html += "<td>";
8484
let txt = datum.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
85-
html += `<a href="/detailed-query.html?commit=${sha}&benchmark=${bench}&run_name=${run}">${txt}</a>`;
85+
if (selfProfileAvailable) {
86+
html += `<a href="/detailed-query.html?commit=${sha}&benchmark=${bench}&run_name=${run}">${txt}</a>`;
87+
} else {
88+
html += txt;
89+
}
8690
html += "</td>";
8791
} else {
8892
html += "<td>-</td>";
@@ -368,8 +372,10 @@ <h3>Commits</h3>
368372
html += "<tr data-field-start=true>";
369373
html += `<th style="width: ${max_name_width/2}em;" data-js-name=${field.name}>` + truncate_name(field.name) + "</th>";
370374
let entry = field.fields[0];
371-
html += add_datum_fields(entry.datum_a, data.a.commit, field.name, entry.casename);
372-
html += add_datum_fields(entry.datum_b, data.b.commit, field.name, entry.casename);
375+
html += add_datum_fields(entry.datum_a, data.a.commit,
376+
field.name, entry.casename, false);
377+
html += add_datum_fields(entry.datum_b, data.b.commit,
378+
field.name, entry.casename, false);
373379
let pct = add_percent(entry.percent, dodgy, "??");
374380
html += `<td>${pct}</td>`;
375381
html += "</tr>";
@@ -391,8 +397,10 @@ <h3>Commits</h3>
391397
html += "<tr>";
392398
html += "<td>" + entry.casename + "</td>";
393399
// No base comparison commit for the first datum
394-
html += add_datum_fields(entry.datum_a, data.a.commit, field.name, entry.casename);
395-
html += add_datum_fields(entry.datum_b, data.b.commit, field.name, entry.casename);
400+
html += add_datum_fields(entry.datum_a, data.a.commit,
401+
field.name, entry.casename, true);
402+
html += add_datum_fields(entry.datum_b, data.b.commit,
403+
field.name, entry.casename, true);
396404
let pct = add_percent(entry.percent, dodgy, "??");
397405
let diff_href =
398406
`/detailed-query.html?commit=${data.b.commit}&base_commit=${data.a.commit}&benchmark=${field.name}&run_name=${entry.casename}`;

0 commit comments

Comments
 (0)