Expand description
Stores, manages, and provides access to explorer metrics
Structs§
- GasMetrics
- Structure for managing gas metrics across all transactions in the store.
- GasMetrics
Key - Represents a key used to store and fetch metrics in the metrics store.
- Metrics
- Represents metrics used to capture key statistical data.
- Metrics
Store - The
MetricStore
serves as the entry point for managing metrics, offering an API for fetching, inserting, and resetting metrics backed by a Sled database. - Metrics
Store 🔒Overlay - The
MetricsStoreOverlay
provides write operations for managing metrics in conjunction with the underlying sled database. It supports inserting newGasData
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
GasMetricsKey
s 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§
- GasMetrics
KeySource - Provides a unified method for creating new instances of GasMetricKeys using
various time representations:
Timestamp
,u64
timestamp, or&str
timestamp.