Skip to content

Commit cd926b0

Browse files
committed
Small cleanups
1 parent f22b8fc commit cd926b0

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

collector/src/bin/collector.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,6 @@ Make sure to modify `{dir}/perf-config.json` if the category/artifact don't matc
13611361

13621362
// Obtain the configuration and validate that it matches the
13631363
// collector's host target
1364-
// TODO: update heartbeat
13651364
let collector_config = rt
13661365
.block_on(conn.get_collector_config(&collector_name))?
13671366
.ok_or_else(|| {
@@ -1382,7 +1381,6 @@ Make sure to modify `{dir}/perf-config.json` if the category/artifact don't matc
13821381
conn,
13831382
&collector_config,
13841383
benchmarks,
1385-
&host_target_tuple,
13861384
))?;
13871385

13881386
Ok(0)
@@ -1397,7 +1395,6 @@ async fn run_job_queue_benchmarks(
13971395
mut conn: Box<dyn Connection>,
13981396
collector: &CollectorConfig,
13991397
all_compile_benchmarks: Vec<Benchmark>,
1400-
host_target_tuple: &str,
14011398
) -> anyhow::Result<()> {
14021399
let conn = conn.as_mut();
14031400
conn.update_collector_heartbeat(collector.name()).await?;
@@ -1418,7 +1415,6 @@ async fn run_job_queue_benchmarks(
14181415
&benchmark_job,
14191416
artifact_id.clone(),
14201417
&all_compile_benchmarks,
1421-
host_target_tuple,
14221418
)
14231419
.await;
14241420
match result {
@@ -1462,6 +1458,7 @@ async fn run_job_queue_benchmarks(
14621458
// Let's retry the job later, with some sleep
14631459
log::info!("Retrying after 30s...");
14641460
tokio::time::sleep(Duration::from_secs(3)).await;
1461+
tokio::time::sleep(Duration::from_secs(30)).await;
14651462
}
14661463
}
14671464
}
@@ -1482,7 +1479,7 @@ enum BenchmarkJobError {
14821479
}
14831480

14841481
impl From<anyhow::Error> for BenchmarkJobError {
1485-
fn from(error: Error) -> Self {
1482+
fn from(error: anyhow::Error) -> Self {
14861483
Self::Transient(error)
14871484
}
14881485
}
@@ -1492,7 +1489,6 @@ async fn run_benchmark_job(
14921489
job: &BenchmarkJob,
14931490
artifact_id: ArtifactId,
14941491
all_compile_benchmarks: &[Benchmark],
1495-
host_target_tuple: &str,
14961492
) -> Result<(), BenchmarkJobError> {
14971493
// Fail the job if it has been dequeued too many times
14981494
if job.deque_count() > MAX_JOB_FAILS {
@@ -1529,7 +1525,9 @@ async fn run_benchmark_job(
15291525
sysroot.preserve();
15301526
Toolchain::from_sysroot(&sysroot, commit.sha.clone())
15311527
}
1532-
ArtifactId::Tag(tag) => create_toolchain_from_published_version(&tag, &host_target_tuple)?,
1528+
ArtifactId::Tag(tag) => {
1529+
create_toolchain_from_published_version(&tag, job.target().as_str())?
1530+
}
15331531
};
15341532
log::info!("Sysroot download finished");
15351533

collector/src/toolchain.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ impl SysrootDownloadError {
3030

3131
/// Sysroot downloaded from CI.
3232
pub struct Sysroot {
33-
pub sha: String,
33+
sha: String,
3434
pub components: ToolchainComponents,
35-
pub triple: String,
36-
pub preserve: bool,
35+
triple: String,
36+
preserve: bool,
3737
}
3838

3939
impl Sysroot {

0 commit comments

Comments
 (0)