Rename a metric

other fixes recommended in PR 2461
This commit is contained in:
wileyj
2021-03-15 09:58:18 -04:00
parent 9b6ef48d3a
commit f834ec9950
5 changed files with 9 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
[network]
rpc_bind = "0.0.0.0:28443"
block_time = 120000
block_time = 60000
miner_address = "mmNe3BjtYa8ZWtpQxfpsE8aWKgHh77LYTT"
faucet_address = "n3k15aVS4rEWhVYn4YfAFjD8Em5mmsducg"
bitcoind_rpc_host = "127.0.0.1:18443"

View File

@@ -40,7 +40,8 @@ use chainstate::stacks::{
TransactionPayload,
};
use monitoring::{
increment_stx_blocks_processed_counter, increment_stx_smart_contracts, update_stacks_tip_height,
increment_contract_calls_processed, increment_stx_blocks_processed_counter,
update_stacks_tip_height,
}; //promserver
use net::atlas::{AtlasConfig, AttachmentInstance};
use util::db::Error as DBError;
@@ -688,7 +689,7 @@ impl<'a, T: BlockEventDispatcher, N: CoordinatorNotices, U: RewardSetProvider>
transaction.payload
{
let contract_id = contract_call.to_clarity_contract_id();
increment_stx_smart_contracts(); //promserver
increment_contract_calls_processed(); //promserver
if self.atlas_config.contracts.contains(&contract_id) {
for event in receipt.events.iter() {
if let StacksTransactionEvent::SmartContractEvent(

View File

@@ -266,7 +266,7 @@ pub fn increment_stx_mempool_gc() {
prometheus::STX_MEMPOOL_GC.inc();
}
pub fn increment_stx_smart_contracts() {
pub fn increment_contract_calls_processed() {
#[cfg(feature = "monitoring_prom")]
prometheus::STX_SMART_CONTRACT_COUNT.inc();
prometheus::CONTRACT_CALLS_PROCESSED_COUNT.inc();
}

View File

@@ -144,9 +144,9 @@ lazy_static! {
"Total count of all mempool garbage collections"
)).unwrap();
pub static ref STX_SMART_CONTRACT_COUNT: IntCounter = register_int_counter!(opts!(
"stacks_node_smart_contracts",
"Total count of smart contracts"
pub static ref CONTRACT_CALLS_PROCESSED_COUNT: IntCounter = register_int_counter!(opts!(
"stacks_contract_calls_processed",
"Total count of processed contract calls"
)).unwrap();
pub static ref MEMPOOL_OUTSTANDING_TXS: IntGauge = register_int_gauge!(opts!(

View File

@@ -112,16 +112,6 @@ use super::{RPCPoxCurrentCycleInfo, RPCPoxNextCycleInfo};
pub const STREAM_CHUNK_SIZE: u64 = 4096;
// #[cfg(feature = "monitoring_prom")]
// lazy_static! {
// static ref RPC_REQ_HISTOGRAM: prometheus::monitoring::HistogramVec = register_histogram_vec!(
// "stacks_node_rpc_request_duration_seconds",
// "Stacks RPC request latencies in seconds",
// &["handler"]
// )
// .unwrap();
// }
#[derive(Default)]
pub struct RPCHandlerArgs<'a> {
pub exit_at_block_height: Option<&'a u64>,