1use diem_metrics::{
9 register_histogram_vec, register_int_counter, register_int_gauge,
10 register_int_gauge_vec, HistogramVec, IntCounter, IntGauge, IntGaugeVec,
11};
12use once_cell::sync::Lazy;
13
14pub static DIEM_STORAGE_COMMITTED_TXNS: Lazy<IntCounter> = Lazy::new(|| {
15 register_int_counter!(
16 "diem_storage_committed_txns",
17 "Diem storage committed transactions"
18 )
19 .unwrap()
20});
21
22pub static DIEM_STORAGE_LATEST_TXN_VERSION: Lazy<IntGauge> = Lazy::new(|| {
23 register_int_gauge!(
24 "diem_storage_latest_transaction_version",
25 "Diem storage latest transaction version"
26 )
27 .unwrap()
28});
29
30pub static DIEM_STORAGE_LEDGER_VERSION: Lazy<IntGauge> = Lazy::new(|| {
31 register_int_gauge!(
32 "diem_storage_ledger_version",
33 "Version in the latest saved ledger info."
34 )
35 .unwrap()
36});
37
38pub static DIEM_STORAGE_NEXT_BLOCK_EPOCH: Lazy<IntGauge> = Lazy::new(|| {
39 register_int_gauge!(
40 "diem_storage_next_block_epoch",
41 "ledger_info.next_block_epoch() for the latest saved ledger info."
42 )
43 .unwrap()
44});
45
46pub static DIEM_STORAGE_API_LATENCY_SECONDS: Lazy<HistogramVec> =
47 Lazy::new(|| {
48 register_histogram_vec!(
49 "diem_storage_api_latency_seconds",
51 "Diem storage api latency in seconds",
53 &["api_name", "result"]
55 )
56 .unwrap()
57 });
58
59pub static DIEM_STORAGE_OTHER_TIMERS_SECONDS: Lazy<HistogramVec> =
60 Lazy::new(|| {
61 register_histogram_vec!(
62 "diem_storage_other_timers_seconds",
64 "Various timers below public API level.",
66 &["name"]
68 )
69 .unwrap()
70 });
71
72pub static DIEM_STORAGE_ROCKSDB_PROPERTIES: Lazy<IntGaugeVec> =
74 Lazy::new(|| {
75 register_int_gauge_vec!(
76 "diem_rocksdb_properties",
78 "rocksdb integer properties",
80 &["cf_name", "property_name",]
82 )
83 .unwrap()
84 });