Skip to content

Commit

Permalink
perf: tweak the dashboard page
Browse files Browse the repository at this point in the history
- Change links to point at the LUCI build dashboard.
- Call the branch input "Go branch" and tweak the help text to match.
- Add some helpful text if no data could be fetched for charts.
- Update the release branch list to include new releases and drop old
  ones.

Change-Id: If821a9919d5ae3e07ddc7e394c8887db0bb1d146
Reviewed-on: https://go-review.googlesource.com/c/build/+/563875
Reviewed-by: Michael Pratt <[email protected]>
Auto-Submit: Michael Knyszek <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
mknyszek authored and gopherbot committed Feb 13, 2024
1 parent ac6cf18 commit 3d1fda8
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions perf/app/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ <h1>
<option>go</option>
<option>tools</option>
</select>
Branch:
Go branch:
<select id="branch-select" name="branch">
<option>master</option>
<option>release-branch.go1.17</option>
<option>release-branch.go1.18</option>
<option>release-branch.go1.19</option>
<option>release-branch.go1.20</option>
<option>release-branch.go1.21</option>
<option>release-branch.go1.22</option>
</select>
Duration (days):
<div class="Dashboard-duration">
Expand All @@ -80,14 +80,14 @@ <h1>
<p>
Note that some commits are not tested, so there could be
multiple commits (not shown) between two points on the graph.
See the <code>linux-amd64-perf</code> column on the
<a href="https://build.golang.org/?repo=golang.org%2fx%2fbenchmarks">x/benchmarks build dashboard</a>
See the <code>gotip-linux-amd64-perf_vs_release</code> column on the
<a href="https://ci.chromium.org/p/golang/g/go-gotip/console">build dashboard</a>
for tested ("ok") / untested (empty) commits.
</p>
<p>
The 'branch' selection above is the Go branch that benchmarking
ran against on <a href=https://build.golang.org>the build dashboard</a>,
not the subrepo branch.
The 'Go branch' selection above is the Go branch that benchmarking
ran against on
<a href="https://ci.chromium.org/ui/p/golang">the build dashboard</a>.
</p>
<p>
Using the 'unit' search box above leads to a page that shows much
Expand Down Expand Up @@ -121,6 +121,17 @@ <h2 class="Dashboard-title" id="loading">Loading...</h2>
// the amount of noise is incredibly low.
const minViewDeltaPercent = 0.025;

// HTML to inject when there's no data found.
const noDataHTML = `
<grid class="Dashboard-section Dashboard-section-expand">
<h2 class="Dashboard-title">No data</h2>
<p class="Dashboard-documentation">
Found no data. Consider trying a different time range. Note also that subrepositories like tools have
no data against the Go master branch, in which case, try picking a release branch.
</p>
</grid>
`

function removeLoadingMessage() {
let loading = document.getElementById("loading");
loading.parentNode.removeChild(loading);
Expand All @@ -133,6 +144,7 @@ <h2 class="Dashboard-title" id="loading">Loading...</h2>

let prevName = "";
let grid = null;
let addedChart = false;
for (const b in benchmarks) {
const bench = benchmarks[b];

Expand Down Expand Up @@ -201,6 +213,10 @@ <h2 class="Dashboard-title" id="loading">Loading...</h2>
higherIsBetter: bench.HigherIsBetter,
}));
grid.appendChild(item);
addedChart = true;
}
if (!addedChart) {
dashboard.innerHTML = noDataHTML;
}
}

Expand Down

0 comments on commit 3d1fda8

Please sign in to comment.