mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-07 18:37:56 -05:00
details
This commit is contained in:
parent
bc92d97a76
commit
eaa76ecb4c
2 changed files with 7 additions and 4 deletions
|
|
@ -14,6 +14,7 @@ let work ~dom_idx ~n () : unit =
|
|||
|
||||
(* Thread.delay 1e-6 *)
|
||||
if dom_idx = 0 && _i mod 4096 = 0 then (
|
||||
Trace_core.message "gc stats";
|
||||
let stat = Gc.quick_stat () in
|
||||
Trace_core.counter_float "gc.minor" (8. *. stat.minor_words);
|
||||
Trace_core.counter_float "gc.major" (8. *. stat.major_words)
|
||||
|
|
|
|||
|
|
@ -36,13 +36,15 @@ end = struct
|
|||
mutable data: (string * user_data) list array;
|
||||
}
|
||||
|
||||
let init_size_ = 1
|
||||
|
||||
let create () : t =
|
||||
{
|
||||
len = 0;
|
||||
span = BA1.create BA.Int64 BA.C_layout 64;
|
||||
start_time_ns = BA1.create BA.Int64 BA.C_layout 64;
|
||||
name = Array.make 64 "";
|
||||
data = Array.make 64 [];
|
||||
span = BA1.create BA.Int64 BA.C_layout init_size_;
|
||||
start_time_ns = BA1.create BA.Int64 BA.C_layout init_size_;
|
||||
name = Array.make init_size_ "";
|
||||
data = Array.make init_size_ [];
|
||||
}
|
||||
|
||||
let[@inline] cap self = Array.length self.name
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue