diff --git a/.github/workflows/deploy_page.yml b/.github/workflows/deploy_page.yml index cd2751a0a..fa00d30c8 100644 --- a/.github/workflows/deploy_page.yml +++ b/.github/workflows/deploy_page.yml @@ -43,7 +43,7 @@ jobs: repository: "bevyengine/bevy" ref: "main" path: "bevy" - fetch-depth: 2000 + fetch-depth: 1000 - uses: Swatinem/rust-cache@v2 - name: Build Reports run: | diff --git a/.github/workflows/queue_commits.yml b/.github/workflows/queue_commits.yml index 23bd694ac..d82eb2fc0 100644 --- a/.github/workflows/queue_commits.yml +++ b/.github/workflows/queue_commits.yml @@ -75,7 +75,7 @@ jobs: repository: "bevyengine/bevy" ref: "main" path: "bevy" - fetch-depth: 500 + fetch-depth: 1000 - uses: actions/checkout@v4 with: ref: "queue" diff --git a/src/bin/landing-page.rs b/src/bin/landing-page.rs index 43aedf739..afa38f93d 100644 --- a/src/bin/landing-page.rs +++ b/src/bin/landing-page.rs @@ -110,7 +110,7 @@ fn main() { revwalk.push_head().unwrap(); let mut commits = revwalk .filter_map(|c| repo.find_commit(*c.as_ref().unwrap()).ok()) - .take(500) + .take(1000) .flat_map(|commit| { let captures = summary_regex.captures(commit.summary().unwrap())?; let id = commit.id().to_string(); diff --git a/src/bin/reports.rs b/src/bin/reports.rs index ce04c8423..0111e366d 100644 --- a/src/bin/reports.rs +++ b/src/bin/reports.rs @@ -15,8 +15,6 @@ use twitcher::{ stats::{Stats, find_stats_files}, }; -const DATE_LIMIT: chrono::Duration = chrono::Duration::weeks(26); - #[derive(Serialize)] struct Commit { id: String, @@ -35,7 +33,7 @@ fn main() -> Result<(), Box> { .map(|id| format!(".{id}")) .unwrap_or("".to_string()); - let stats: Vec = find_stats_files(Path::new("results")) + let mut stats: Vec = find_stats_files(Path::new("results")) .iter() .map(|path| { let file = File::open(path).unwrap(); @@ -54,7 +52,6 @@ fn main() -> Result<(), Box> { revwalk.push_head().unwrap(); let commits = revwalk .filter_map(|c| repo.find_commit(*c.as_ref().unwrap()).ok()) - .take(5000) .map(|commit| { let (summary, pr) = if let Some(captures) = summary_regex.captures(commit.summary().unwrap()) { @@ -74,17 +71,21 @@ fn main() -> Result<(), Box> { done: false, } }) - .filter(|commit| { - (chrono::Utc::now() - - chrono::DateTime::from_timestamp_millis(commit.timestamp * 1000).unwrap()) - <= DATE_LIMIT - }) .map(|mut commit| { commit.done = stats.iter().any(|s| commit.id == s.commit); commit }) .collect::>(); + // Only report on the bevy history that is available + let start = commits + .iter() + .map(|c| c.timestamp) + .min() + .unwrap_or_default() + * 1000; + stats.retain(|stat| stat.commit_timestamp >= start as u128); + let crate_names = setup_compile_stats(&stats, &cache_id); let stress_tests = setup_runtime("stress-test-fps", &stats, &cache_id); let large_scenes = setup_runtime("large-scene-fps", &stats, &cache_id); @@ -124,10 +125,7 @@ fn main() -> Result<(), Box> { context.insert("commits", &commits); context.insert("stress_tests", &stress_tests_alpha); context.insert("benchmarks", &benchmarks_alpha); - context.insert( - "start", - &((chrono::Utc::now() - DATE_LIMIT).timestamp() * 1000), - ); + context.insert("start", &start); context.insert("end", &(chrono::Utc::now().timestamp() * 1000)); context.insert( "threemonthsago", @@ -206,12 +204,6 @@ fn setup_compile_stats<'a>(stats: &'a [Stats], cache_id: &str) -> Vec<&'a str> { compilation_keys.into_iter().for_each(|metric| { let values = stats .iter() - .filter(|stat| { - (chrono::Utc::now() - - chrono::DateTime::from_timestamp_millis(stat.commit_timestamp as i64) - .unwrap()) - <= DATE_LIMIT - }) .flat_map(|stat| { stat.metrics.get(metric).map(|value| DataPoint { timestamp: stat.commit_timestamp, @@ -267,15 +259,6 @@ fn setup_runtime(kind: &str, stats: &[Stats], cache_id: &str) -> Vec<(String, f6 .flat_map(|stress_test| { let values = stats .iter() - .filter(|stat| { - (chrono::Utc::now() - - chrono::DateTime::from_timestamp_millis(stat.commit_timestamp as i64) - .unwrap()) - <= DATE_LIMIT - && chrono::DateTime::from_timestamp_millis(stat.commit_timestamp as i64) - .unwrap() - > chrono::DateTime::parse_from_rfc3339("2026-03-30T12:00:00Z").unwrap() // Data before this date is not with the same format - }) .flat_map(|stat| { stat.metrics .get(&format!( @@ -380,12 +363,6 @@ fn setup_benchmarks(stats: &[Stats], cache_id: &str) -> Vec<(String, f64)> { .flat_map(|(benchmark, safe_name)| { let values = stats .iter() - .filter(|stat| { - (chrono::Utc::now() - - chrono::DateTime::from_timestamp_millis(stat.commit_timestamp as i64) - .unwrap()) - <= DATE_LIMIT - }) .flat_map(|stat| { stat.metrics .get(&format!("benchmarks.{benchmark}.mean"))