Tezos_dal_node_lib.Dal_metricsUpdate the DAL metrics counter when a reconstruction is started.
Update the DAL metrics counter of enqueued reconstruction tasks
Update a DAL metrics timing when a whole amplification is done.
Update the DAL metrics counter when a reconstruction is aborted because enough shards have been received during the random delay.
Update the "waiting_for_attestation" status of the given slot index in the metrics. The value is set to 1 if set is true, and -1 otherwise.
Update the "attestation" status of the given slot index in the metrics. The value is set to 1 if set is true, and -1 otherwise.
val attested_slots_for_baker_per_level_ratio :
delegate:Tezos_crypto.Signature.Public_key_hash.t ->
float ->
unitUpdate the "attestation" ratio for the baker
A new layer1 head with the given round was seen.
Update the finalized layer1 blocks with the given value.
A new layer1 block with the given round was finalized.
Update the shards verification time with the given value.
Update the KVS shards metrics.
Update the DAL metrics timing value when enough of all the shards are received.
Update the DAL metrics timing value when all the shards are received.
Add a DAL metrics timing value when a reconstruction is started.
Add a the DAL metrics timing value when a reconstruction is aborted.
val sample_time :
sampling_frequency:int ->
to_sample:(unit -> 'a) ->
metric_updater:(float -> unit) ->
'asample_time ~sampling_frequency ~to_sample ~metric_updater samples execution time of function to_sample at frequency sampling_frequency. Execution time if any is then provided to metric_updater.
val slot_metrics_encoding :
slot_metrics Tezos_base.TzPervasives.Data_encoding.tval pp_slot_metrics : Stdlib.Format.formatter -> slot_metrics -> unitval pp_slot_metrics_received : Stdlib.Format.formatter -> slot_metrics -> unitpp_slot_metrics_received only prints the time and duration to receive the p2p messages, omitting completely the information about validation time.
val collect_gossipsub_metrics :
Tezos_dal_node_lib_gossipsub.Gossipsub.Worker.t ->
unitcollect_gossipsub_metrics gs_worker allows to periodically collect metrics from the given GS Worker state.
val update_timing_shard_received :
slot_metrics Slot_id_bounded_map.t ->
last_expected_shard:bool ->
Slot_id_bounded_map.key ->
bool * slot_metricsupdate_timing_shard_received shards_timing_table ~last_expected_shards slot_id updates the timing metrics associated with slot_id in the shards_timing_table.
This function should be called each time a shard is received. It records the timestamp of the first shard received for a slot, and updates the duration when all shards are received. The last_expected_shard boolean indicates that this shard is the last expected one, meaning that if all shards received until now are valid, then the slot is attestable (in attester mode) / we have all the cryptobox_parameters.number_of_shards shards for the slot (in observer mode).
This function outputs the up-to-date slot_metrics with a boolean stating if it has been updated or not.
No I/O is performed; the function only modifies the in-memory timing table.
val update_timing_shard_validated :
slot_metrics Slot_id_bounded_map.t ->
number_of_already_stored_shards:int ->
number_of_expected_shards:int ->
?min_shards_to_reconstruct_slot:int ->
Slot_id_bounded_map.key ->
bool * slot_metricsupdate_timing_shard_validated shards_timing_table ~number_of_already_stored_shards ~number_of_expected_shards ?min_shards_to_reconstruct_slot slot_id updates the timing metrics associated with slot_id in the shards_timing_table.
This function should be called each time a shard is validated. This function is very similar to update_timing_shard_received. There are two main differences:
number_of_already_stored_shards and the number_of_expected_shards to compute itself if it is the last expected shard that just got validated.min_shards_to_reconstruct_slot argument is passed, it also updates the time when this number of shards are validated.No I/O is performed; the function only modifies the in-memory timing table.