package irmin-pack
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=cd788a8d3f4a3dd18dc160a153d4aec91eaf6b0fb41ad41464d26c79c304a98e
sha512=4f97862678d35e0b4aa814a1df51d6f8c59bcf5b611c73f0a475f9b5386ca42a4a18e65ce80fc425ddad93fcdacfcb563c52f6423777610a0bc567902f4db088
doc/irmin-pack.unix/Irmin_pack_unix/Stats/index.html
Module Irmin_pack_unix.Stats
Source
type t = {
pack_store : Pack_store.stat;
index : Index.stat;
file_manager : File_manager.stat;
latest_gc : Latest_gc.stat;
}
Record type for all statistics that will be collected. There is a single instance (which we refer to as "the instance" below) which is returned by get
.
reset_stats ()
will call the relevant clear
function on each field of the instance. This typically resets the fields (e.g. to 0 for an int field).
get ()
returns the instance of t
that stores the satistics. If report_pack_store
or report_index
is not called before, the content will be filled with default value, decided at create time (most the time, 0
).
report_pack_store ~field
increments the field
value in the pack_store
stats. It also increments the total
field in Pack_store.t
when the field is related to finds
.
report_index ()
fills the stats
with value from the Index.Stats
module. This essentially copies the "current" values from Index.Stats
to the get()
instance index
field.
incr_appended_hashes ()
increments the field appended_hashes
for pack_store
in the instance.
incr_appended_offsets
increments the field appended_offsets
for pack_store
in the instance.
offset_ratio
: appended_offsets / (appended_offsets + appended_hashes)
; offset_significance
: appended_offsets + appended_hashes
get_cache_stats()
uses the instance pack_store
field to compute cache misses.
get_offset_stats()
uses the instance pack_store
field to compute offset stats.
incr_fm_field field
increments the chosen stats field for the File_manager
report_latest_gc gc_stats
sets (get ()).latest_gc
to the stats of the latest successful GC.