File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -635,9 +635,13 @@ impl Session {
635
635
self . perf_stats. incr_comp_hashes_count. get( ) ) ;
636
636
println ! ( "Total number of bytes hashed for incr. comp.: {}" ,
637
637
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
+ }
641
645
println ! ( "Total time spent computing symbol hashes: {}" ,
642
646
duration_to_secs_str( self . perf_stats. symbol_hash_time. get( ) ) ) ;
643
647
println ! ( "Total time spent decoding DefPath tables: {}" ,
You can’t perform that action at this time.
0 commit comments