diff --git a/web3_proxy/src/stats/influxdb_queries.rs b/web3_proxy/src/stats/influxdb_queries.rs index 32ac6e61..68425ab8 100644 --- a/web3_proxy/src/stats/influxdb_queries.rs +++ b/web3_proxy/src/stats/influxdb_queries.rs @@ -17,9 +17,16 @@ use chrono::{DateTime, FixedOffset}; use fstrings::{f, format_args_f}; use hashbrown::HashMap; use influxdb2::models::Query; -use influxdb2::{Client, FromDataPoint}; +use influxdb2::FromDataPoint; use serde_json::json; +#[derive(Debug, Default, FromDataPoint)] +pub struct AggregatedRpcAccounting { + field: String, + value: f64, + time: DateTime, +} + pub async fn query_user_stats<'a>( app: &'a Web3ProxyApp, bearer: Option>>, @@ -92,9 +99,9 @@ pub async fn query_user_stats<'a>( |> yield(name: "mean") "#); - let query = Query::new(query); + let query = Query::new(qs.to_string()); - // let res: Vec<_> = influxdb_client.query(Some(query)).await?; + let res: Vec = influxdb_client.query(Some(query)).await?; todo!(); }