Stat_trace.V0Stats extracted from Irmin_pack.Stats.get ().
val pack_t : pack Repr.ttype tree = {contents_hash : int;contents_find : int;contents_add : int;node_hash : int;node_mem : int;node_add : int;node_find : int;node_val_v : int;node_val_find : int;node_val_list : int;}Stats extracted from Irmin.Tree.counters ().
val tree_t : tree Repr.ttype index = {bytes_read : int;nb_reads : int;bytes_written : int;nb_writes : int;nb_merge : int;new_merge_durations : float list;}Stats extracted from Index.Stats.get ().
new_merge_durations is not just a mirror of Index.Stats.merge_durations, it only contains the new entries since the last time it was recorded. This list is always empty when in the header.
val index_t : index Repr.ttype 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;}Stats extracted from Gc.quick_stat ().
val gc_t : gc Repr.tval disk_t : disk Repr.ttype 'pack_stats bag_of_stats_base = {pack : 'pack_stats;tree : tree;index : index;gc : gc;disk : disk;timestamp_wall : float;timestamp_cpu : float;}Melting pot of stats, recorded before and after every commits.
They are necessary in order to compute any throughput analytics.
val bag_of_stats_base_t : 'a Repr.t -> 'b bag_of_stats_base Repr.tStats computed from the tree value passed to the commit operation, before the commit, when the tree still carries the modifications brought by the previous operations.
val store_before_t : store_before Repr.tStats computed on the tree value passed to the commit operation, after the commit, when the inode has been reconstructed and that Tree.length is now innexpensive to perform.
val store_after_t : store_after Repr.ttype 'pack_stats commit_base = {duration : float32;before : 'pack_stats bag_of_stats_base;after : 'pack_stats bag_of_stats_base;store_before : store_before;store_after : store_after;}val commit_base_t : 'a Repr.t -> 'b commit_base Repr.tval row_base_t :
'a Repr.t ->
[ `Add of int32
| `Checkout of int32
| `Commit of 'a commit_base
| `Copy of int32
| `Find of int32
| `Mem of int32
| `Mem_tree of int32
| `Remove of int32 ]
Repr.tStats gathered while running an operation.
Operation durations
For each operation we record its wall time length using a float32, a float16 would be suitable too (it has >3 digits of precision).
Time and disk performance considerations
On commit we record a lot of things, thankfuly the frequency is low: ~1/600. 599 small operations weigh ~3600 bytes, 1 commit weighs ~300 bytes. The trace reaches 1GB after ~250k commits.
val row_t :
[ `Add of int32
| `Checkout of int32
| `Commit of pack commit_base
| `Copy of int32
| `Find of int32
| `Mem of int32
| `Mem_tree of int32
| `Remove of int32 ]
Repr.tInformations gathered from the tree.exe parameters.
val setup_replay_t : setup_replay Repr.ttype config = {inode_config : int * int * int;store_type : [ `Pack | `Pack_layered | `Pack_mem ];setup : [ `Play of setup_play | `Replay of setup_replay ];}val config_t : config Repr.ttype 'pack_stats header_base = {config : config;hostname : string;timeofday : float;word_size : int;initial_stats : 'pack_stats bag_of_stats_base;}val header_base_t : 'a Repr.t -> 'b header_base Repr.ttype header = pack header_baseFile header.
Timestamps
stats.timestamp_wall and stats.timestamp_cpu are the starting points of the trace, they are to be substracted from their counterpart in commit to compute time spans.
timeofday is the date and time at which the stats started to be accumulated.
stats.timestamp_wall may originate from Mtime_clock.now.
stats.timestamp_cpu may originate from Sys.time.
It would be great to be able to record the library/sources versions.
val header_t : pack header_base Repr.ttype commit = pack commit_baseval commit_t : pack commit_base Repr.ttype bag_of_stats = pack bag_of_stats_baseval bag_of_stats_t : pack bag_of_stats_base Repr.t