Module Core_profiler_offline_tool.Id_table

An Id_table.t exploits the fact that Probe_id.ts should be consecutive integers to make lookups fast

type ('a, +'rw) t
val create : Core_profiler.Probe_id.t list ‑> 'a ‑> ('a_t

To create a table you need to specify which Probe_id.ts are valid cells, and give an empty value. This can either be in the form of a list of Probe_id.ts, or by copying the list from another Id_table.t (whose cell contents are ignored)

val create' : (__t ‑> 'a ‑> ('a_t
val init : Core_profiler.Probe_id.t list ‑> f:(Core_profiler.Probe_id.t ‑> 'a) ‑> ('a_t
val init_from_map : 'b Core_profiler.Probe_id.Map.t ‑> f:(Core_profiler.Probe_id.t ‑> 'b ‑> 'a) ‑> ('a_t
val set_exn : ('aCore.read_writet ‑> Core_profiler.Probe_id.t ‑> 'a ‑> unit
val find : ('a_t ‑> Core_profiler.Probe_id.t ‑> 'a option

A ('a, read_only) Id_table.t is meant to look like an Probe_id.Map.t:

val find_exn : ('a_t ‑> Core_profiler.Probe_id.t ‑> 'a
val iter : ('a_t ‑> f:(Core_profiler.Probe_id.t ‑> 'a ‑> unit) ‑> unit
val fold : ('a_t ‑> init:'accum ‑> f:('accum ‑> Core_profiler.Probe_id.t ‑> 'a ‑> 'accum) ‑> 'accum
val fold_right : ('a_t ‑> init:'accum ‑> f:('accum ‑> Core_profiler.Probe_id.t ‑> 'a ‑> 'accum) ‑> 'accum
val to_alist : ('a_t ‑> (Core_profiler.Probe_id.t * 'a) list
val map : ('a_t ‑> f:(Core_profiler.Probe_id.t ‑> 'a ‑> 'b) ‑> ('b_t
val filter_map : ('a_t ‑> f:(Core_profiler.Probe_id.t ‑> 'a ‑> 'b option) ‑> ('b_t
val read_only : ('a_t ‑> ('aCore.readt