Module IBase.LogEntry

Log entry data model, global log entry store and functions to manipulate it. Direct access to the store is not exposed.

type count_entry_data = {
  1. value : int;
}
type time_entry_data = {
  1. duration_us : int;
}
type string_data = {
  1. message : string;
}
type entry_data =
  1. | Count of count_entry_data
  2. | Time of time_entry_data
  3. | String of string_data
type t = {
  1. label : string;
  2. created_at_ts : int;
  3. data : entry_data;
}

created_at_ts is a unix timestamp (in seconds)

val mk_count : label:string -> value:int -> t
val mk_time : label:string -> duration_us:int -> t
val mk_string : label:string -> message:string -> t
val global_log_get : unit -> t list
val global_log_erase : unit -> unit
val global_log_add : t -> unit