Skip to content

Commit 9553fd9

Browse files
committed
Use a transaction to store runtime benchmark metrics
1 parent 288e96e commit 9553fd9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

collector/src/runtime/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pub async fn bench_runtime(
4646
continue;
4747
}
4848

49+
let mut tx = conn.transaction().await;
4950
for message in execute_runtime_benchmark_binary(&group.binary, &filter, iterations)? {
5051
let message = message.map_err(|err| {
5152
anyhow::anyhow!(
@@ -63,7 +64,7 @@ pub async fn bench_runtime(
6364

6465
print_stats(&result);
6566
record_stats(
66-
conn.as_ref(),
67+
tx.conn(),
6768
collector.artifact_row_id,
6869
&rustc_perf_version,
6970
result,
@@ -73,7 +74,10 @@ pub async fn bench_runtime(
7374
}
7475
}
7576

76-
collector.end_runtime_step(conn.as_mut(), &group).await;
77+
collector.end_runtime_step(tx.conn(), &group).await;
78+
tx.commit()
79+
.await
80+
.expect("Cannot commit runtime benchmark group results");
7781
}
7882

7983
Ok(())

0 commit comments

Comments
 (0)