package irmin-pack

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type rusage = {
  1. maxrss : int64;
  2. minflt : int64;
  3. majflt : int64;
  4. inblock : int64;
  5. oublock : int64;
  6. nvcsw : int64;
  7. nivcsw : int64;
}
val rusage_t : rusage Irmin.Type.t
type ocaml_gc = {
  1. minor_words : float;
  2. promoted_words : float;
  3. major_words : float;
  4. minor_collections : int;
  5. major_collections : int;
  6. heap_words : int;
  7. compactions : int;
  8. top_heap_words : int;
  9. stack_size : int;
}
val ocaml_gc_t : ocaml_gc Irmin.Type.t
type duration = {
  1. wall : float;
  2. sys : float;
  3. user : float;
}

Timings in seconds

val duration_t : duration Irmin.Type.t
type step = {
  1. duration : duration;
  2. rusage : rusage;
  3. ocaml_gc : ocaml_gc;
  4. index : Index.Stats.t;
  5. pack_store : Irmin_pack_unix__.Stats_intf.Pack_store.t;
  6. inode : Irmin_pack.Stats.Inode.t;
}

Stats gathered for one worker step

val step_t : step Irmin.Type.t
type worker = {
  1. initial_maxrss : int64;
  2. initial_heap_words : int;
  3. initial_top_heap_words : int;
  4. initial_stack_size : int;
  5. steps : (string * step) list;
  6. files : (string * Optint.Int63.t) list;
  7. objects_traversed : Optint.Int63.t;
  8. suffix_transfers : Optint.Int63.t list;
}

Stats produced by the worker. They are meant to be transmited to the parent process through the gc result JSON file.

steps is the list of all step names associated with the timing of these steps plus stats recorded at the end of the step. An association lists is used here instead of types because in the future the exact list of tasks may change and we don't want the rigidity of types, especially because these informations will end up appearing in a file format.

Since the worker lives in a fork, rusage and ocaml_gc contain stats that are impacted by what happened in the main process, prior to the fork. The init_* fields reflect this.

The total wall time of the worker is the sum of all wall fields in steps.

files contains the size of files created by the GC. And association list is used instead of plain types for the same reason as steps/

suffix_transfers contains an int for each transfer loop to the new suffix. That integer corresponds to the number of bytes copied during that loop. The sum of these integers is equal to the "suffix" step in files.

val worker_t : worker Irmin.Type.t
type stats = {
  1. generation : int;
  2. commit_offset : Optint.Int63.t;
  3. before_suffix_start_offset : Optint.Int63.t;
  4. before_suffix_end_offset : Optint.Int63.t;
  5. after_suffix_start_offset : Optint.Int63.t;
  6. after_suffix_end_offset : Optint.Int63.t;
  7. steps : (string * duration) list;
  8. worker : worker;
}

All the stats for a single successful GC run.

commit_offset is the offset of the commit provided by the irmin user.

The before_* (and after_*) offsets track the state of the suffix before (and after) the GC.

steps has a similar meaning as steps in worker but for the main process.

val stats_t : stats Irmin.Type.t
type t = Irmin_pack_unix__.Stats_intf.Latest_gc.stats option

Latest_gc.t is an option type because before the first gc end, there are no gc stats to expose.

val t : stats option Irmin.Type.t
type stat
val export : stat -> t
val new_suffix_end_offset_before_finalise : worker -> Optint.Int63.t
val finalise_duration : stats -> float

Time taken by the GC finalisation in seconds. It includes the time it took to wait for the worker to finish in case of ~wait:true.

val total_duration : stats -> float

Total wall duration of the GC in seconds, from the call to GC and to the end of finalise. This duration contains the time it takes for the user to trigger a finalise while the worker is over.

val finalise_suffix_transfer : stats -> Optint.Int63.t

finalise_suffix_transfer stats is the number of bytes appended to the new suffix by the finalise step of the GC. Before this, the worker already appended bytes to the new suffix, this is reported in worker.suffix_transfers.

OCaml

Innovation. Community. Security.