File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -635,9 +635,13 @@ impl Session {
635635 self . perf_stats. incr_comp_hashes_count. get( ) ) ;
636636 println ! ( "Total number of bytes hashed for incr. comp.: {}" ,
637637 self . perf_stats. incr_comp_bytes_hashed. get( ) ) ;
638- println ! ( "Average bytes hashed per incr. comp. HIR node: {}" ,
639- self . perf_stats. incr_comp_bytes_hashed. get( ) /
640- self . perf_stats. incr_comp_hashes_count. get( ) ) ;
638+ if self . perf_stats . incr_comp_hashes_count . get ( ) != 0 {
639+ println ! ( "Average bytes hashed per incr. comp. HIR node: {}" ,
640+ self . perf_stats. incr_comp_bytes_hashed. get( ) /
641+ self . perf_stats. incr_comp_hashes_count. get( ) ) ;
642+ } else {
643+ println ! ( "Average bytes hashed per incr. comp. HIR node: N/A" ) ;
644+ }
641645 println ! ( "Total time spent computing symbol hashes: {}" ,
642646 duration_to_secs_str( self . perf_stats. symbol_hash_time. get( ) ) ) ;
643647 println ! ( "Total time spent decoding DefPath tables: {}" ,
You can’t perform that action at this time.
0 commit comments