From e23d4e62663419d91c486e70e63808792b62b9ff Mon Sep 17 00:00:00 2001 From: Felipe Gonzalez Date: Tue, 11 Jun 2024 12:42:09 -0300 Subject: [PATCH] fix: Metric now uses full execution time (#51) --- bootstrap/proxy/config.tf | 2 +- operator/src/metrics.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/proxy/config.tf b/bootstrap/proxy/config.tf index d7cf418..13abdcb 100644 --- a/bootstrap/proxy/config.tf +++ b/bootstrap/proxy/config.tf @@ -8,7 +8,7 @@ locals { tiers = [ { "name" = "0", - "max_connections" = 1 + "max_connections" = 2 "rates" = [ { "interval" = "1m", diff --git a/operator/src/metrics.rs b/operator/src/metrics.rs index 8baa804..08cbe30 100644 --- a/operator/src/metrics.rs +++ b/operator/src/metrics.rs @@ -247,7 +247,7 @@ pub fn run_metrics_collector(state: Arc) { if let Some(tier) = result.metric.tier { state .metrics - .count_usage(project, resource_name, &tier, result.value); + .count_usage(project, resource_name, &tier, total_exec_time); } } }