File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -207,14 +207,23 @@ fn bench(
207
207
) ;
208
208
}
209
209
210
- let interned_cid = rt. block_on ( conn. artifact_id ( & cid) ) ;
211
-
212
- let start = Instant :: now ( ) ;
213
210
let steps = benchmarks
214
211
. iter ( )
215
212
. map ( |b| b. name . to_string ( ) )
216
213
. collect :: < Vec < _ > > ( ) ;
217
- rt. block_on ( conn. collector_start ( interned_cid, & steps) ) ;
214
+
215
+ // Make sure there is no observable time when the artifact ID is available
216
+ // but the in-progress steps are not.
217
+ let interned_cid = {
218
+ let mut tx = rt. block_on ( conn. transaction ( ) ) ;
219
+ let interned_cid = rt. block_on ( tx. conn ( ) . artifact_id ( & cid) ) ;
220
+ rt. block_on ( tx. conn ( ) . collector_start ( interned_cid, & steps) ) ;
221
+
222
+ rt. block_on ( tx. commit ( ) ) . unwrap ( ) ;
223
+ interned_cid
224
+ } ;
225
+
226
+ let start = Instant :: now ( ) ;
218
227
let mut skipped = false ;
219
228
for ( nth_benchmark, benchmark) in benchmarks. iter ( ) . enumerate ( ) {
220
229
let is_fresh =
You can’t perform that action at this time.
0 commit comments