package irmin-bench
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=09996fbcc2c43e117a9bd8e9028c635e81cccb264d5e02d425ab8b06bbacdbdb
sha512=0391a6bf7b94a1edd50a3a8df9e58961739fa78d7d689d61f56bc87144483bad2ee539df595c33d9d52c29b3458da5dddf3a73b5eb85e49c4667c26d2cd46be1
doc/irmin-bench.traces/Irmin_traces/Trace_definitions/Stat_trace/index.html
Module Trace_definitions.Stat_trace
Source
Trace of a tezos node run, or a replay run.
May be summarised to a JSON file.
Implicitly Auto-Upgradable File Format
The stat trace has these two properties:
- It supports extensions, in order to change or add new stats in the future.
- Old trace files from old versions are still readable.
There are multiple reasons for wanting compatibility with old versions:
- Because one of the goal of the benchmarks is to assess the evolution of performances across distant versions of irmin, we need stability in order to avoid recomputing everything every time.
- When those traces will be produced by Tezos nodes, we have no control over the version of those traces.
For this system to work, the "decoding shape" of a version of the stat trace shouldn't ever change (once fixed). The way the trace is built for a version should be stable too.
To modify something in the definition or the collection: append a new version.
include module type of struct include Latest end
include module type of struct include V0 end
type tree = V0.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 ()
.
type index = V0.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.
type gc = V0.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 ()
.
Stats extracted from filesystem. Requires the path to the irmin store.
type 'pack_stats bag_of_stats_base = 'pack_stats V0.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.
Stats 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.
type watched_node = [
| `Contracts_index
| `Big_maps_index
| `Rolls_index
| `Rolls_owner_current
| `Commitments
| `Contracts_index_ed25519
| `Contracts_index_originated
]
val watched_node_to_enum :
[< `Big_maps_index
| `Commitments
| `Contracts_index
| `Contracts_index_ed25519
| `Contracts_index_originated
| `Rolls_index
| `Rolls_owner_current ] ->
int
val watched_node_of_enum :
int ->
[> `Big_maps_index
| `Commitments
| `Contracts_index
| `Contracts_index_ed25519
| `Contracts_index_originated
| `Rolls_index
| `Rolls_owner_current ]
option
Stats 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.
type 'pack_stats commit_base = 'pack_stats V0.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 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.t
Informations gathered from the tezos node.
Noting so far. Any ideas?
Informations gathered from the tree.exe parameters.
type config = V0.config = {
inode_config : int * int * int;
store_type : [ `Pack | `Pack_layered | `Pack_mem ];
setup : [ `Play of setup_play | `Replay of setup_replay ];
}
type 'pack_stats header_base = 'pack_stats V0.header_base = {
config : config;
hostname : string;
timeofday : float;
word_size : int;
initial_stats : 'pack_stats bag_of_stats_base;
}
type pack = V1.pack = {
finds : finds;
appended_hashes : int;
appended_offsets : int;
inode_add : int;
inode_remove : int;
inode_of_seq : int;
inode_of_raw : int;
inode_rec_add : int;
inode_rec_remove : int;
inode_to_binv : int;
inode_decode_bin : int;
inode_encode_bin : int;
}
Stats extracted from Irmin_pack.Stats.get ()
.
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.t
include sig ... end
val encode_lrow :
[ `Add of int32
| `Checkout of int32
| `Commit of V1.pack V0.commit_base
| `Copy of int32
| `Find of int32
| `Mem of int32
| `Mem_tree of int32
| `Remove of int32 ]
Repr.encode_bin
val decoded_seq_of_encoded_chan_with_prefixes :
'a Repr.ty ->
in_channel ->
unit ->
'a Seq.node
val open_reader :
string ->
V1.pack V0.header_base
* (unit ->
[ `Add of int32
| `Checkout of int32
| `Commit of V1.pack V0.commit_base
| `Copy of int32
| `Find of int32
| `Mem of int32
| `Mem_tree of int32
| `Remove of int32 ]
Seq.node)
val append_row :
writer ->
[ `Add of int32
| `Checkout of int32
| `Commit of V1.pack V0.commit_base
| `Copy of int32
| `Find of int32
| `Mem of int32
| `Mem_tree of int32
| `Remove of int32 ] ->
unit