@ -25,7 +25,7 @@ let register_report_at_exit file =
let exit_timeofday = Unix . gettimeofday () in
let exit_timeofday = Unix . gettimeofday () in
let exit_times = Unix . times () in
let exit_times = Unix . times () in
let stats =
let stats =
` Assoc [
` Assoc ( [
( " rtime " , ` Float ( exit_timeofday -. initial_timeofday ) ) ;
( " rtime " , ` Float ( exit_timeofday -. initial_timeofday ) ) ;
( " utime " , ` Float ( exit_times . tms_utime -. initial_times . tms_utime ) ) ;
( " utime " , ` Float ( exit_times . tms_utime -. initial_times . tms_utime ) ) ;
( " stime " , ` Float ( exit_times . tms_stime -. initial_times . tms_stime ) ) ;
( " stime " , ` Float ( exit_times . tms_stime -. initial_times . tms_stime ) ) ;
@ -40,8 +40,8 @@ let register_report_at_exit file =
( " compactions " , ` Int gc_stats . compactions ) ;
( " compactions " , ` Int gc_stats . compactions ) ;
( " top_heap_gb " , ` Float ( words_to_gb ( float_of_int gc_stats . top_heap_words ) ) ) ;
( " top_heap_gb " , ` Float ( words_to_gb ( float_of_int gc_stats . top_heap_words ) ) ) ;
( " stack_kb " , ` Float ( words_to_kb ( float_of_int gc_stats . stack_size ) ) ) ;
( " stack_kb " , ` Float ( words_to_kb ( float_of_int gc_stats . stack_size ) ) ) ;
( " minor_heap_kb " , ` Float ( words_to_kb ( float_of_int gc_ctrl . minor_heap_size ) ) ) ;
( " minor_heap_kb " , ` Float ( words_to_kb ( float_of_int gc_ctrl . minor_heap_size ) ) )
] in
] @ [ AttributesTable . stats () ] ) in
try
try
let stats_oc = open_out file in
let stats_oc = open_out file in
Yojson . pretty_to_channel stats_oc stats ;
Yojson . pretty_to_channel stats_oc stats ;