From 31227d8c0c40b26ed3bd8b807e18036c2465a294 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 14 Sep 2022 07:08:48 +0000 Subject: [PATCH] drop in flight. throughput is enough --- web3_proxy/src/app.rs | 6 +++--- web3_proxy/src/rpcs/request.rs | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/web3_proxy/src/app.rs b/web3_proxy/src/app.rs index 2369c998..d19554a1 100644 --- a/web3_proxy/src/app.rs +++ b/web3_proxy/src/app.rs @@ -21,7 +21,7 @@ use futures::stream::FuturesUnordered; use futures::stream::StreamExt; use futures::Future; use hashbrown::HashMap; -use metered::{metered, ErrorCount, HitCount, InFlight, ResponseTime, Throughput}; +use metered::{metered, ErrorCount, HitCount, ResponseTime, Throughput}; use migration::{Migrator, MigratorTrait}; use moka::future::Cache; use redis_rate_limit::{Config as RedisConfig, Pool as RedisPool, RedisRateLimit, Runtime}; @@ -364,7 +364,7 @@ impl Web3ProxyApp { } #[instrument(skip_all)] - #[measure([ErrorCount, HitCount, InFlight, ResponseTime, Throughput])] + #[measure([ErrorCount, HitCount, ResponseTime, Throughput])] pub async fn eth_subscribe<'a>( self: &'a Arc, payload: JsonRpcRequest, @@ -621,7 +621,7 @@ impl Web3ProxyApp { } } - #[measure([ErrorCount, HitCount, InFlight, ResponseTime, Throughput])] + #[measure([ErrorCount, HitCount, ResponseTime, Throughput])] #[instrument(skip_all)] async fn proxy_web3_rpc_request( self: &Arc, diff --git a/web3_proxy/src/rpcs/request.rs b/web3_proxy/src/rpcs/request.rs index f2a7c93b..2e8c8224 100644 --- a/web3_proxy/src/rpcs/request.rs +++ b/web3_proxy/src/rpcs/request.rs @@ -3,7 +3,6 @@ use super::provider::Web3Provider; use metered::metered; use metered::ErrorCount; use metered::HitCount; -use metered::InFlight; use metered::ResponseTime; use metered::Throughput; use std::fmt; @@ -66,7 +65,7 @@ impl OpenRequestHandle { /// TODO: we no longer take self because metered doesn't like that /// TODO: ErrorCount includes too many types of errors, such as transaction reverts #[instrument(skip_all)] - #[measure([ErrorCount, HitCount, InFlight, ResponseTime, Throughput])] + #[measure([ErrorCount, HitCount, ResponseTime, Throughput])] pub async fn request( &self, method: &str,