Skip to content

Commit cf9bfd1

Browse files
authored
Merge pull request #1995 from s7tya/mark-local-benchmarks-as-master
Mark the local benchmarks as 'master'
2 parents 025f64b + 53b4035 commit cf9bfd1

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

collector/src/bin/collector.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use std::time::Duration;
1616
use std::{str, time::Instant};
1717

1818
use anyhow::Context;
19+
use chrono::Utc;
1920
use clap::builder::TypedValueParser;
2021
use clap::{Arg, Parser};
2122
use collector::compare::compare_artifacts;
@@ -731,7 +732,12 @@ fn main_result() -> anyhow::Result<i32> {
731732

732733
let mut rt = build_async_runtime();
733734
let mut conn = rt.block_on(pool.connection());
734-
let artifact_id = ArtifactId::Tag(toolchain.id.clone());
735+
let artifact_id = ArtifactId::Commit(Commit {
736+
sha: toolchain.id.clone(),
737+
date: Utc::now().into(),
738+
r#type: CommitType::Master,
739+
});
740+
735741
rt.block_on(purge_old_data(conn.as_mut(), &artifact_id, purge.purge));
736742

737743
let runtime_suite = rt.block_on(load_runtime_benchmarks(
@@ -880,7 +886,12 @@ fn main_result() -> anyhow::Result<i32> {
880886
)?;
881887
benchmarks.retain(|b| local.category.0.contains(&b.category()));
882888

883-
let artifact_id = ArtifactId::Tag(toolchain.id.clone());
889+
let artifact_id = ArtifactId::Commit(Commit {
890+
sha: toolchain.id.clone(),
891+
date: Utc::now().into(),
892+
r#type: CommitType::Master,
893+
});
894+
884895
let mut rt = build_async_runtime();
885896
let mut conn = rt.block_on(pool.connection());
886897
rt.block_on(purge_old_data(conn.as_mut(), &artifact_id, purge.purge));

0 commit comments

Comments
 (0)