30 seconds for tsdb everywhere

This commit is contained in:
Bryan Stitt 2023-07-21 15:51:32 -07:00
parent 95bf1db01e
commit 0a3698de0f
3 changed files with 6 additions and 6 deletions

@ -335,7 +335,7 @@ impl Web3ProxyApp {
rpc_secret_key_cache.clone(),
user_balance_cache.clone(),
stat_buffer_shutdown_receiver,
1,
30,
flush_stat_buffer_sender.clone(),
flush_stat_buffer_receiver,
)? {

@ -13,7 +13,7 @@ use migration::sea_orm::prelude::Decimal;
use std::time::Duration;
use tokio::sync::{broadcast, mpsc, oneshot};
use tokio::time::{interval, sleep};
use tracing::{error, info, trace, warn, Instrument};
use tracing::{debug, error, info, trace, warn, Instrument};
use ulid::Ulid;
#[derive(Debug, Default)]
@ -144,7 +144,7 @@ impl StatBuffer {
let (count, new_frontend_requests) = self.save_relational_stats().await;
if count > 0 {
db_frontend_requests += new_frontend_requests;
trace!("Saved {} stats for {} requests to the relational db", count, new_frontend_requests);
debug!("Saved {} stats for {} requests to the relational db", count, new_frontend_requests);
}
}
_ = tsdb_save_interval.tick() => {
@ -152,7 +152,7 @@ impl StatBuffer {
let (count, new_frontend_requests) = self.save_tsdb_stats().await;
if count > 0 {
tsdb_frontend_requests += new_frontend_requests;
trace!("Saved {} stats for {} requests to the tsdb", count, new_frontend_requests);
debug!("Saved {} stats for {} requests to the tsdb", count, new_frontend_requests);
}
}
x = flush_receiver.recv() => {

@ -82,13 +82,13 @@ impl MigrateStatsToV2SubCommand {
let emitter_spawn = StatBuffer::try_spawn(
BILLING_PERIOD_SECONDS,
top_config.app.chain_id,
30,
60,
top_config.app.influxdb_bucket.clone(),
influxdb_client.clone(),
rpc_secret_key_cache,
user_balance_cache,
rpc_account_shutdown_recevier,
1,
30,
flush_sender,
flush_receiver,
)