1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
use diem_metrics::{
register_histogram, register_int_counter, register_int_counter_vec, Histogram, IntCounter,
IntCounterVec,
};
use once_cell::sync::Lazy;
pub static TRANSACTIONS_VALIDATED: Lazy<IntCounterVec> = Lazy::new(|| {
register_int_counter_vec!(
"diem_vm_transactions_validated",
"Number of transactions validated",
&["status"]
)
.unwrap()
});
pub static USER_TRANSACTIONS_EXECUTED: Lazy<IntCounterVec> = Lazy::new(|| {
register_int_counter_vec!(
"diem_vm_user_transactions_executed",
"Number of user transactions executed",
&["status"]
)
.unwrap()
});
pub static SYSTEM_TRANSACTIONS_EXECUTED: Lazy<IntCounter> = Lazy::new(|| {
register_int_counter!(
"diem_vm_system_transactions_executed",
"Number of system transactions executed"
)
.unwrap()
});
pub static BLOCK_TRANSACTION_COUNT: Lazy<Histogram> = Lazy::new(|| {
register_histogram!(
"diem_vm_num_txns_per_block",
"Number of transactions per block"
)
.unwrap()
});
pub static TXN_TOTAL_SECONDS: Lazy<Histogram> = Lazy::new(|| {
register_histogram!(
"diem_vm_txn_total_seconds",
"Execution time per user transaction"
)
.unwrap()
});
pub static TXN_VALIDATION_SECONDS: Lazy<Histogram> = Lazy::new(|| {
register_histogram!(
"diem_vm_txn_validation_seconds",
"Validation time per user transaction"
)
.unwrap()
});
pub static TXN_GAS_USAGE: Lazy<Histogram> =
Lazy::new(|| register_histogram!("diem_vm_txn_gas_usage", "Gas used per transaction").unwrap());
pub static CRITICAL_ERRORS: Lazy<IntCounter> = Lazy::new(|| {
register_int_counter!("diem_vm_critical_errors", "Number of critical errors").unwrap()
});