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 @@ -424,6 +424,7 @@ pub struct MeasureProcessor<'a> {
424
424
patched_incr_stats : Vec < ( Patch , ( Stats , Option < SelfProfile > ) ) > ,
425
425
is_first_collection : bool ,
426
426
self_profile : bool ,
427
+ tries : u8 ,
427
428
}
428
429
429
430
impl < ' a > MeasureProcessor < ' a > {
@@ -450,6 +451,7 @@ impl<'a> MeasureProcessor<'a> {
450
451
is_first_collection : true ,
451
452
// Command::new("summarize").status().is_ok()
452
453
self_profile,
454
+ tries : 0 ,
453
455
}
454
456
}
455
457
@@ -570,11 +572,17 @@ impl<'a> Processor for MeasureProcessor<'a> {
570
572
Ok ( Retry :: No )
571
573
}
572
574
Err ( DeserializeStatError :: NoOutput ( output) ) => {
573
- log:: warn!(
574
- "failed to deserialize stats, retrying; output: {:?}" ,
575
- output
576
- ) ;
577
- Ok ( Retry :: Yes )
575
+ if self . tries < 5 {
576
+ log:: warn!(
577
+ "failed to deserialize stats, retrying (try {}); output: {:?}" ,
578
+ self . tries,
579
+ output
580
+ ) ;
581
+ self . tries += 1 ;
582
+ Ok ( Retry :: Yes )
583
+ } else {
584
+ panic ! ( "failed to collect statistics after 5 tries" ) ;
585
+ }
578
586
}
579
587
Err ( e @ DeserializeStatError :: ParseError { .. } ) => {
580
588
panic ! ( "process_perf_stat_output failed: {:?}" , e) ;
You can’t perform that action at this time.
0 commit comments