package irmin-pack
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=11fc2570bdbfd48478c89113fc801084a84a9a2c12d9bf8c64e05ce64ae19bd7
sha512=2171699ca24dec5c9c908a2676b272e034c14eb17f7052a794535e52af0be40be68a689e59c0a640ee244b11703320483f4d0c261542e6242ba23a8f1272b9b0
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 : Index.Stats.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.
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
.