Skip to content

Commit

Permalink
details
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Dec 27, 2023
1 parent bc92d97 commit eaa76ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions bench/trace_fx.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 6 additions & 4 deletions src/fuchsia/fcollector.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eaa76ec

Please sign in to comment.