package index

  1. Overview
  2. Docs
A platform-agnostic multi-level index for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

index-1.6.0.tbz
sha256=5e0c1f6cbd6e485cbbf2344c8f76de8a7869155355ae6edd5550c88da0661594
sha512=613fa206d1124b34259421f4ea978ce4e9404d78af3a687c1e406d88a5d481bd51465fafae58da9eb3e6a0b5408118b8a7dfe1fbb05ce8fed4b8b0a572beb99b

doc/index/Index/Stats/index.html

Module Index.StatsSource

Run-time metric tracking for index instances.

Sourcetype t = {
  1. mutable bytes_read : int;
  2. mutable nb_reads : int;
  3. mutable bytes_written : int;
  4. mutable nb_writes : int;
  5. mutable nb_merge : int;
  6. mutable merge_durations : float list;
  7. mutable nb_replace : int;
  8. mutable replace_durations : float list;
  9. mutable nb_sync : int;
  10. mutable time_sync : float;
  11. mutable lru_hits : int;
  12. mutable lru_misses : int;
}

The type for stats for an index I.

  • bytes_read is the number of bytes read from disk;
  • nb_reads is the number of reads from disk;
  • bytes_written is the number of bytes written to disk;
  • nb_writes is the number of writes to disk;
  • nb_merge is the number of times a merge occurred;
  • merge_durations lists how much time the last 10 merge operations took (in microseconds);
  • nb_replace is the number of calls to I.replace;
  • replace_durations lists how much time replace operations took. Each element is an average of n consecutive replaces, where n is the sampling_interval specified when calling end_replace.
  • time_sync is the duration of the latest call to sync.
Sourceval get : unit -> t
Sourceval reset_stats : unit -> unit
Sourceval add_read : int -> unit
Sourceval add_write : int -> unit
Sourceval incr_nb_merge : unit -> unit
Sourceval incr_nb_replace : unit -> unit
Sourceval incr_nb_sync : unit -> unit
Sourceval incr_nb_lru_hits : unit -> unit
Sourceval incr_nb_lru_misses : unit -> unit
Sourcemodule Make (_ : Platform.CLOCK) : sig ... end