Cleanup metrics (#4230)
This commit is contained in:
@ -4,7 +4,7 @@ use crate::exchange_instruction::*;
|
||||
use crate::exchange_state::*;
|
||||
use crate::id;
|
||||
use log::*;
|
||||
use solana_metrics::counter::Counter;
|
||||
use solana_metrics::inc_new_counter_info;
|
||||
use solana_sdk::account::KeyedAccount;
|
||||
use solana_sdk::instruction::InstructionError;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
@ -390,7 +390,7 @@ impl ExchangeProcessor {
|
||||
Err(e)?
|
||||
}
|
||||
|
||||
inc_new_counter_info!("exchange_processor-swap", 1, 1000, 1000);
|
||||
inc_new_counter_info!("exchange_processor-swaps", 1, 1000, 1000);
|
||||
|
||||
if to_trade.tokens == 0 {
|
||||
// Turn into token account
|
||||
|
@ -6,6 +6,7 @@ use crate::vote_state::{self, Vote, VoteState};
|
||||
use bincode::deserialize;
|
||||
use log::*;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use solana_metrics::datapoint;
|
||||
use solana_sdk::account::KeyedAccount;
|
||||
use solana_sdk::instruction::{AccountMeta, Instruction, InstructionError};
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
@ -87,11 +88,7 @@ pub fn process_instruction(
|
||||
vote_state::authorize_voter(vote_account, other_signers, &voter_id)
|
||||
}
|
||||
VoteInstruction::Vote(votes) => {
|
||||
solana_metrics::submit(
|
||||
solana_metrics::influxdb::Point::new("vote-native")
|
||||
.add_field("count", solana_metrics::influxdb::Value::Integer(1))
|
||||
.to_owned(),
|
||||
);
|
||||
datapoint!("vote-native", ("count", 1, i64));
|
||||
let (vote_account, other_signers) = keyed_accounts.split_at_mut(1);
|
||||
let vote_account = &mut vote_account[0];
|
||||
|
||||
|
Reference in New Issue
Block a user