File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
collector/src/bin/rustc-perf-collector Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -399,6 +399,7 @@ pub struct MeasureProcessor<'a> {
399
399
patched_incr_stats : Vec < ( Patch , ( Stats , Option < SelfProfile > ) ) > ,
400
400
is_first_collection : bool ,
401
401
self_profile : bool ,
402
+ tries : u8 ,
402
403
}
403
404
404
405
impl < ' a > MeasureProcessor < ' a > {
@@ -425,6 +426,7 @@ impl<'a> MeasureProcessor<'a> {
425
426
is_first_collection : true ,
426
427
// Command::new("summarize").status().is_ok()
427
428
self_profile,
429
+ tries : 0 ,
428
430
}
429
431
}
430
432
@@ -544,11 +546,17 @@ impl<'a> Processor for MeasureProcessor<'a> {
544
546
Ok ( Retry :: No )
545
547
}
546
548
Err ( DeserializeStatError :: NoOutput ( output) ) => {
547
- log:: warn!(
548
- "failed to deserialize stats, retrying; output: {:?}" ,
549
- output
550
- ) ;
551
- Ok ( Retry :: Yes )
549
+ if self . tries < 5 {
550
+ log:: warn!(
551
+ "failed to deserialize stats, retrying (try {}); output: {:?}" ,
552
+ self . tries,
553
+ output
554
+ ) ;
555
+ self . tries += 1 ;
556
+ Ok ( Retry :: Yes )
557
+ } else {
558
+ panic ! ( "failed to collect statistics after 5 tries" ) ;
559
+ }
552
560
}
553
561
Err ( e @ DeserializeStatError :: ParseError { .. } ) => {
554
562
panic ! ( "process_perf_stat_output failed: {:?}" , e) ;
You can’t perform that action at this time.
0 commit comments