Skip to content

Add a severity column #999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions site/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ pub mod comparison {
pub profile: String,
pub scenario: String,
pub is_significant: bool,
pub significance_threshold: f64,
pub is_dodgy: bool,
pub historical_statistics: Option<Vec<f64>>,
pub statistics: (f64, f64),
Expand Down
1 change: 1 addition & 0 deletions site/src/comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ pub async fn handle_compare(
scenario: comparison.scenario.to_string(),
is_dodgy: comparison.is_dodgy(),
is_significant: comparison.is_significant(),
significance_threshold: comparison.signifcance_threshold() * 100.0,
historical_statistics: comparison.variance.map(|v| v.data),
statistics: comparison.results,
})
Expand Down
33 changes: 32 additions & 1 deletion site/static/compare.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,15 @@
text-align: center;
}

#benches th {
#benches tbody:first-child th {
text-align: center;
}

#benches tbody:not(:first-child) th {
border-right: dotted 1px;
}

#benches th {
text-align: left;
word-break: break-word;
width: 25%;
Expand Down Expand Up @@ -401,6 +408,26 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
</div>
</div>
<table id="benches" class="compare">
<tbody>
<tr>
<th>Name & Profile</th>
<th>Scenario</th>
<th>{{before}}</th>
<th>{{after}}</th>
<th>% Change</th>
<th>
Significance Factor<span class="tooltip">?
<span class="tooltiptext">
How much a particular result is over the significance threshold. A factor of 2.50x
means
the result is 2.5 times over the significance threshold. You can see <a
href="https://github.com/rust-lang/rustc-perf/blob/master/docs/comparison-analysis.md#what-makes-a-test-result-significant">
here</a> how the significance threshold is calculated.
</span>
</span>
</th>
</tr>
</tbody>
<template v-for="bench in benches">
<tbody>
<template v-for="run in bench.variants">
Expand All @@ -425,6 +452,9 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
</span>
</a>
</td>
<td>
{{ Math.abs(run.percent / run.significanceThreshold).toFixed(2) }}x
</td>
</tr>
</template>
</tbody>
Expand Down Expand Up @@ -541,6 +571,7 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
datumB,
percent,
isDodgy,
significanceThreshold: r.significance_threshold,
isSignificant
});
}
Expand Down