Skip to content

Commit af2bdd3

Browse files
committed
Adjust the number of historical runs we compare to from 100 to 30
1 parent dbf1dab commit af2bdd3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

site/src/api.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ pub mod comparison {
194194
pub profile: String,
195195
pub scenario: String,
196196
pub is_relevant: bool,
197+
pub significance_threshold: f64,
197198
pub significance_factor: f64,
198199
pub statistics: (f64, f64),
199200
}

site/src/comparison.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ pub async fn handle_compare(
135135
profile: comparison.profile.to_string(),
136136
scenario: comparison.scenario.to_string(),
137137
is_relevant: comparison.is_relevant(),
138+
significance_threshold: comparison.significance_threshold(),
138139
significance_factor: comparison.significance_factor(),
139140
statistics: comparison.results,
140141
})
@@ -1012,8 +1013,7 @@ pub struct HistoricalDataMap {
10121013
}
10131014

10141015
impl HistoricalDataMap {
1015-
const NUM_PREVIOUS_COMMITS: usize = 100;
1016-
const MIN_PREVIOUS_COMMITS: usize = 50;
1016+
const NUM_PREVIOUS_COMMITS: usize = 30;
10171017

10181018
async fn calculate(
10191019
ctxt: &SiteCtxt,
@@ -1030,7 +1030,7 @@ impl HistoricalDataMap {
10301030
));
10311031

10321032
// Return early if we don't have enough data for historical analysis
1033-
if previous_commits.len() < Self::MIN_PREVIOUS_COMMITS {
1033+
if previous_commits.len() < Self::NUM_PREVIOUS_COMMITS {
10341034
return Ok(Self {
10351035
data: historical_data,
10361036
});
@@ -1054,7 +1054,7 @@ impl HistoricalDataMap {
10541054
}
10551055

10561056
// Only retain test cases for which we have enough data to calculate variance.
1057-
historical_data.retain(|_, v| v.data.len() >= Self::MIN_PREVIOUS_COMMITS);
1057+
historical_data.retain(|_, v| v.data.len() >= Self::NUM_PREVIOUS_COMMITS);
10581058

10591059
Ok(Self {
10601060
data: historical_data,

0 commit comments

Comments
 (0)