Skip to content

Commit 65c438f

Browse files
committed
Refactor collector result handling
1 parent adad86a commit 65c438f

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

collector/src/bin/collector.rs

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -966,19 +966,15 @@ fn main_result() -> anyhow::Result<i32> {
966966

967967
let pool = database::Pool::open(&db.db);
968968

969-
match next {
969+
let res = match next {
970970
NextArtifact::Release(tag) => {
971971
let toolchain = create_toolchain_from_published_version(&tag, &target_triple)?;
972-
let res = bench_published_artifact(
972+
bench_published_artifact(
973973
rt.block_on(pool.connection()),
974974
&mut rt,
975975
toolchain,
976976
&benchmark_dirs,
977-
);
978-
979-
client.post(format!("{}/perf/onpush", site_url)).send()?;
980-
981-
res?;
977+
)
982978
}
983979
NextArtifact::Commit {
984980
commit,
@@ -1034,20 +1030,17 @@ fn main_result() -> anyhow::Result<i32> {
10341030
toolchain,
10351031
};
10361032

1037-
let res = run_benchmarks(
1033+
run_benchmarks(
10381034
&mut rt,
10391035
conn,
10401036
shared,
10411037
Some(compile_config),
10421038
Some(runtime_config),
1043-
);
1044-
1045-
client.post(format!("{}/perf/onpush", site_url)).send()?;
1046-
1047-
res?;
1039+
)
10481040
}
1049-
}
1050-
1041+
};
1042+
client.post(format!("{}/perf/onpush", site_url)).send()?;
1043+
res?;
10511044
Ok(0)
10521045
}
10531046

0 commit comments

Comments
 (0)