File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
collector/src/bin/rustc-perf-collector Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -524,8 +524,10 @@ impl<'a> Processor for ProfileProcessor<'a> {
524524 }
525525 fs:: rename ( & tmp_zsp_dir, & zsp_dir) ?;
526526
527- // Rename the data files.
527+ // Rename the data files. There should be exactly three.
528+ let mut num_files = 0 ;
528529 for entry in fs:: read_dir ( & zsp_dir) . unwrap ( ) {
530+ num_files += 1 ;
529531 let filename = entry. unwrap ( ) . file_name ( ) ;
530532 let filename_str = filename. to_str ( ) . unwrap ( ) ;
531533 let path = filepath ( & zsp_dir, filename_str) ;
@@ -539,6 +541,7 @@ impl<'a> Processor for ProfileProcessor<'a> {
539541 panic ! ( "unexpected file {:?}" , path) ;
540542 }
541543 }
544+ assert_eq ! ( num_files, 3 ) ;
542545
543546 // Run `summarize`.
544547 let mut summarize_cmd = Command :: new ( "summarize" ) ;
You can’t perform that action at this time.
0 commit comments