File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,15 @@ async fn create_benchmark_request_master_commits(
2626 conn : & dyn database:: pool:: Connection ,
2727 index : & BenchmarkRequestIndex ,
2828) -> anyhow:: Result < ( ) > {
29- let master_commits = & ctxt. get_master_commits ( ) . commits ;
29+ let now = Utc :: now ( ) ;
30+
31+ let master_commits = ctxt. get_master_commits ( ) ;
32+ // Only consider the last ~month of master commits
33+ let master_commits = master_commits
34+ . commits
35+ . iter ( )
36+ . filter ( |c| now. signed_duration_since ( c. time ) < chrono:: Duration :: days ( 29 ) ) ;
37+
3038 // TODO; delete at some point in the future
3139 let cutoff: chrono:: DateTime < Utc > = chrono:: DateTime :: from_str ( "2025-08-27T00:00:00.000Z" ) ?;
3240
@@ -62,12 +70,11 @@ async fn create_benchmark_request_releases(
6270 // TODO; delete at some point in the future
6371 let cutoff: chrono:: DateTime < Utc > = chrono:: DateTime :: from_str ( "2025-08-27T00:00:00.000Z" ) ?;
6472
65- let releases: Vec < _ > = releases
73+ let releases = releases
6674 . lines ( )
6775 . rev ( )
6876 . filter_map ( parse_release_string)
69- . take ( 20 )
70- . collect ( ) ;
77+ . take ( 20 ) ;
7178
7279 for ( name, commit_date) in releases {
7380 if commit_date >= cutoff && !index. contains_tag ( & name) {
You can’t perform that action at this time.
0 commit comments