1use diem_metrics::{
9 register_histogram, register_int_counter, Histogram, IntCounter,
10};
11use once_cell::sync::Lazy;
12
13pub static DIEM_EXECUTOR_VM_EXECUTE_BLOCK_SECONDS: Lazy<Histogram> =
14 Lazy::new(|| {
15 register_histogram!(
16 "diem_executor_vm_execute_block_seconds",
18 "The time spent in seconds of vm block execution in Diem executor"
20 )
21 .unwrap()
22 });
23
24pub static DIEM_EXECUTOR_ERRORS: Lazy<IntCounter> = Lazy::new(|| {
25 register_int_counter!(
26 "diem_executor_error_total",
27 "Cumulative number of errors"
28 )
29 .unwrap()
30});
31
32pub static DIEM_EXECUTOR_EXECUTE_BLOCK_SECONDS: Lazy<Histogram> =
33 Lazy::new(|| {
34 register_histogram!(
35 "diem_executor_execute_block_seconds",
37 "The total time spent in seconds of block execution in Diem executor "
39 )
40 .unwrap()
41 });
42
43pub static DIEM_EXECUTOR_COMMIT_BLOCKS_SECONDS: Lazy<Histogram> =
44 Lazy::new(|| {
45 register_histogram!(
46 "diem_executor_commit_blocks_seconds",
48 "The total time spent in seconds of commiting blocks in Diem executor "
50 )
51 .unwrap()
52 });
53
54pub static DIEM_EXECUTOR_SAVE_TRANSACTIONS_SECONDS: Lazy<Histogram> = Lazy::new(
55 || {
56 register_histogram!(
57 "diem_executor_save_transactions_seconds",
59 "The time spent in seconds of calling save_transactions to storage in Diem executor"
61 )
62 .unwrap()
63 },
64);
65
66pub static DIEM_EXECUTOR_TRANSACTIONS_SAVED: Lazy<Histogram> =
67 Lazy::new(|| {
68 register_histogram!(
69 "diem_executor_transactions_saved",
71 "The number of transactions saved to storage in Diem executor"
73 )
74 .unwrap()
75 });