use aptos_metrics_core::{
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!(
"aptos_vm_transactions_validated",
"Number of transactions validated",
&["status"]
)
.unwrap()
});
pub static USER_TRANSACTIONS_EXECUTED: Lazy<IntCounterVec> = Lazy::new(|| {
register_int_counter_vec!(
"aptos_vm_user_transactions_executed",
"Number of user transactions executed",
&["status"]
)
.unwrap()
});
pub static SYSTEM_TRANSACTIONS_EXECUTED: Lazy<IntCounter> = Lazy::new(|| {
register_int_counter!(
"aptos_vm_system_transactions_executed",
"Number of system transactions executed"
)
.unwrap()
});
pub static BLOCK_TRANSACTION_COUNT: Lazy<Histogram> = Lazy::new(|| {
register_histogram!(
"aptos_vm_num_txns_per_block",
"Number of transactions per block"
)
.unwrap()
});
pub static TXN_TOTAL_SECONDS: Lazy<Histogram> = Lazy::new(|| {
register_histogram!(
"aptos_vm_txn_total_seconds",
"Execution time per user transaction"
)
.unwrap()
});
pub static TXN_VALIDATION_SECONDS: Lazy<Histogram> = Lazy::new(|| {
register_histogram!(
"aptos_vm_txn_validation_seconds",
"Validation time per user transaction"
)
.unwrap()
});
pub static TXN_GAS_USAGE: Lazy<Histogram> = Lazy::new(|| {
register_histogram!("aptos_vm_txn_gas_usage", "Gas used per transaction").unwrap()
});
pub static CRITICAL_ERRORS: Lazy<IntCounter> = Lazy::new(|| {
register_int_counter!("aptos_vm_critical_errors", "Number of critical errors").unwrap()
});