Module Core_profiler__Protocol.Writer

The Writer module contains functions that invoke parts of Header_protocol and Short_header in order to write into the relevant (global variable) buffers in Buffer

val epoch : Core_profiler.Profiler_epoch.t
val max_time : Core.Time_ns.t
val write_new_single : Core_profiler.Probe_id.t -> string -> Core_profiler.Probe_type.t -> unit

These write into the header chunk

val write_new_group : Core_profiler.Probe_id.t -> string -> Core_profiler.Probe_type.t -> unit
val write_new_group_point : group_id:Core_profiler.Probe_id.t -> id:Core_profiler.Probe_id.t -> string -> Core_profiler.Probe_id.t array -> unit
val write_timer_at : Core_profiler.Probe_id.t -> Core.Time_ns.t -> unit

These write into the short message buffer

val write_probe_at : Core_profiler.Probe_id.t -> Core.Time_ns.t -> int -> unit
val write_group_reset : Core_profiler.Probe_id.t -> Core.Time_ns.t -> unit
val dump_stats : unit -> unit
val set_at_exit_handler : [ `Write_file of string | `Function of (Core.readIobuf.no_seek) Iobuf.t -> (Core.readIobuf.no_seek) Iobuf.t list -> unit | `Disable ] -> unit

Choose what to do with the in memory stats data at exit. The handler function is passed the header chunk and the list of data chunks. Defaults to `Write_file "stats.dat".

module Unsafe_internals : sig ... end

To aid producing test cases for Reader.