diff --git a/bench/trace_fx.ml b/bench/trace_fx.ml index cf55da8..b2c0b8f 100644 --- a/bench/trace_fx.ml +++ b/bench/trace_fx.ml @@ -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) diff --git a/src/fuchsia/fcollector.ml b/src/fuchsia/fcollector.ml index 223def1..0f5b486 100644 --- a/src/fuchsia/fcollector.ml +++ b/src/fuchsia/fcollector.ml @@ -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