Skip to content

Commit 7be4802

Browse files
Do not compare crates that build in less than a second
Wall-time comparison for crates that build in less than a second are never going to be reliable enough for us to make use of them. And, for the most part, anything that builds in a second we don't actually care much about, since it's almost certainly not a bottleneck in rustc build times (we have 100 second long builds for rustc_middle, for example).
1 parent 6c664b2 commit 7be4802

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

site/src/server.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,15 @@ impl DateData {
726726
.filter_map(|(k, mut v)| {
727727
v.pop()
728728
.unwrap_or_default()
729+
// FIXME: if we're hovering right at the 1 second mark,
730+
// this might mean we end up with a Some for one commit and
731+
// a None for the other commit. Ultimately it doesn't matter
732+
// that much -- we'll mostly just ignore such results.
733+
// Anything less than a second in wall-time measurements is
734+
// always going to be pretty high variance just from process
735+
// startup overheads and such, though, so we definitely
736+
// don't want to compare those values.
737+
.filter(|v| v.as_secs() >= 1)
729738
.map(|v| (k, v.as_nanos() as u64))
730739
})
731740
.collect::<HashMap<_, _>>();

0 commit comments

Comments
 (0)