Module stats

Module stats 

Source
Expand description

§Statistics Module

This module collects and manages runtime statistics for the node. It tracks three main categories of statistics that can be queried via RPC endpoints.

§Components

Sub-modulePurpose
actionsTracks action dispatch frequency and timing
syncTracks blockchain synchronization progress
block_producerTracks block production attempts and outcomes

§Architecture

The Stats struct is held by the Service trait implementation and is accessed via store.service.stats() in effects. Statistics are updated during effect execution, not in reducers, since they are side-effects that don’t affect the core state machine.

§Usage

Statistics are collected in effects throughout the codebase:

§RPC Endpoints

Statistics are exposed via RPC for monitoring and debugging. These endpoints are consumed by the frontend dashboard to display node health and performance:

  • ActionStatsGet - Returns action dispatch statistics
  • SyncStatsGet - Returns synchronization statistics
  • BlockProducerStatsGet - Returns block production statistics

Modules§

actions
block_producer
stats_actions 🔒
stats_block_producer 🔒
stats_sync 🔒
sync

Structs§

Stats

Type Aliases§

ActionKindWithMeta