package octez-internal-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/irmin_pack_unix/Irmin_pack_unix/Stats/Latest_gc/index.html
Module Stats.Latest_gc
Source
type rusage = {
maxrss : int64;
minflt : int64;
majflt : int64;
inblock : int64;
oublock : int64;
nvcsw : int64;
nivcsw : int64;
}
type ocaml_gc = {
minor_words : float;
promoted_words : float;
major_words : float;
minor_collections : int;
major_collections : int;
heap_words : int;
compactions : int;
top_heap_words : int;
stack_size : int;
}
Timings in seconds
type step = {
duration : duration;
rusage : rusage;
ocaml_gc : ocaml_gc;
index : Irmin_pack_unix__.Stats_intf.Index.S.t;
pack_store : Irmin_pack_unix__.Stats_intf.Pack_store.t;
inode : Irmin_pack.Stats.Inode.t;
}
Stats gathered for one worker step
type worker = {
initial_maxrss : int64;
initial_heap_words : int;
initial_top_heap_words : int;
initial_stack_size : int;
steps : (string * step) list;
files : (string * Optint.Int63.t) list;
objects_traversed : Optint.Int63.t;
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
.
type stats = {
generation : int;
commit_offset : Optint.Int63.t;
before_suffix_start_offset : Optint.Int63.t;
before_suffix_end_offset : Optint.Int63.t;
after_suffix_start_offset : Optint.Int63.t;
after_suffix_end_offset : Optint.Int63.t;
steps : (string * duration) list;
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.
Latest_gc.t
is an option
type because before the first gc end, there are no gc stats to expose.
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
.
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.