Module metrics

Source
Expand description

Stores, manages, and provides access to explorer metrics

Structs§

GasMetrics
Structure for managing gas metrics across all transactions in the store.
GasMetricsKey
Represents a key used to store and fetch metrics in the metrics store.
Metrics
Represents metrics used to capture key statistical data.
MetricsStore
The MetricStore serves as the entry point for managing metrics, offering an API for fetching, inserting, and resetting metrics backed by a Sled database.
MetricsStoreOverlay 🔒
The MetricsStoreOverlay provides write operations for managing metrics in conjunction with the underlying sled database. It supports inserting new GasData into the stored accumulated metrics, adding transaction gas data, and reverting metric changes after a specified height.

Constants§

GAS_METRICS_KEY_TIME_INTERVAL
The time interval for GasMetricsKeys in the main tree, specified in seconds. Metrics are stored in hourly intervals (3600 seconds), meaning all metrics accumulated within a specific hour are stored using a key representing the start of that hour.
SLED_GAS_METRICS_BY_HEIGHT_TREE
Gas metrics by_height tree that contains all metrics by height.
SLED_GAS_METRICS_TREE
Gas metrics tree name.
SLED_TX_GAS_DATA_TREE
Transaction gas data tree name.

Traits§

GasMetricsKeySource
Provides a unified method for creating new instances of GasMetricKeys using various time representations: Timestamp, u64 timestamp, or &str timestamp.