Skip to content

Commit 23c0418

Browse files
authored
gc: fix time unit in jl_print_gc_stats (#50417)
1 parent 435c1c1 commit 23c0418

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/gc-debug.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,11 +784,12 @@ void jl_print_gc_stats(JL_STREAM *s)
784784
malloc_stats();
785785
#endif
786786
double ptime = jl_hrtime() - process_t0;
787-
jl_safe_printf("exec time\t%.5f sec\n", ptime);
787+
double exec_time = jl_ns2s(ptime);
788+
jl_safe_printf("exec time\t%.5f sec\n", exec_time);
788789
if (gc_num.pause > 0) {
789790
jl_safe_printf("gc time \t%.5f sec (%2.1f%%) in %d (%d full) collections\n",
790791
jl_ns2s(gc_num.total_time),
791-
jl_ns2s(gc_num.total_time) / ptime * 100,
792+
jl_ns2s(gc_num.total_time) / exec_time * 100,
792793
gc_num.pause, gc_num.full_sweep);
793794
jl_safe_printf("gc pause \t%.2f ms avg\n\t\t%2.0f ms max\n",
794795
jl_ns2ms(gc_num.total_time) / gc_num.pause,

0 commit comments

Comments
 (0)