-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
55 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ mod output_handler; | |
mod process; | ||
mod storage; | ||
|
||
mod metrics; | ||
#[cfg(test)] | ||
mod tests; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//! Metrics for `VmRunner`. | ||
use std::time::Duration; | ||
|
||
use vise::{Buckets, Gauge, Histogram, Metrics}; | ||
|
||
#[derive(Debug, Metrics)] | ||
#[metrics(prefix = "vm_runner")] | ||
pub(super) struct VmRunnerMetrics { | ||
/// Last batch that has been marked as processed. | ||
pub last_processed_batch: Gauge<u64>, | ||
/// Last batch that is ready to be processed. | ||
pub last_ready_batch: Gauge<u64>, | ||
/// Current amount of batches that are being processed. | ||
pub in_progress_l1_batches: Gauge<u64>, | ||
/// Total latency of loading an L1 batch (RocksDB mode only). | ||
#[metrics(buckets = Buckets::LATENCIES)] | ||
pub storage_load_time: Histogram<Duration>, | ||
/// Total latency of running VM on an L1 batch. | ||
#[metrics(buckets = Buckets::LATENCIES)] | ||
pub run_vm_time: Histogram<Duration>, | ||
/// Total latency of handling output of an L1 batch. | ||
#[metrics(buckets = Buckets::LATENCIES)] | ||
pub output_handle_time: Histogram<Duration>, | ||
} | ||
|
||
#[vise::register] | ||
pub(super) static METRICS: vise::Global<VmRunnerMetrics> = vise::Global::new(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters