Module Trace_collection.Make_stat

Make state trace collector.

Parameters

Signature

type t = {
  1. writer : Def.writer;
  2. store_path : string;
  3. mutable t0 : Mtime_clock.counter;
  4. mutable prev_merge_durations : float list;
  5. mutable commit_before : Def.bag_of_stats * Def.store_before;
}

Imperative stat trace collector. It is optimised to minimise the CPU footprint.

module Bag_of_stats : sig ... end
val create_file : string -> Def.config -> string -> t
val flush : t -> unit
val close : t -> unit
val remove : t -> unit
val short_op_begin : t -> unit
val short_op_end : t -> [< `Add | `Checkout | `Copy | `Find | `Mem | `Mem_tree | `Remove ] -> unit
val create_store_before : Store.tree -> Def.store_before Lwt.t
val create_store_after : Store.tree -> Def.store_after Lwt.t
val commit_begin : t -> Store.tree -> unit Lwt.t
val commit_end : t -> Store.tree -> unit Lwt.t