From 25bc4d7cf2b7b4ed6cca9cd67ba06409eb5ab8ad Mon Sep 17 00:00:00 2001 From: Francesco Casula Date: Tue, 2 Jan 2024 10:23:24 +0100 Subject: [PATCH 1/2] chore: custom buckets for gw request size --- runner/buckets.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/runner/buckets.go b/runner/buckets.go index 51eeaa7dd1..949927edef 100644 --- a/runner/buckets.go +++ b/runner/buckets.go @@ -1,6 +1,15 @@ package runner var customBuckets = map[string][]float64{ + "gateway.request_size": { + 10, // 10 bytes + 100, // 100 bytes + 1000, // 1kb + 10000, // 10kb + 100000, // 100kb + 1000000, // 1mb + 10000000, // 10mb + }, "gateway.response_time": { 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 60, }, From ca1d466c731bd2c09927203a9cc82d656f15c9ac Mon Sep 17 00:00:00 2001 From: Francesco Casula Date: Wed, 3 Jan 2024 13:25:17 +0100 Subject: [PATCH 2/2] chore: using constants --- runner/buckets.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/runner/buckets.go b/runner/buckets.go index 949927edef..f38061b609 100644 --- a/runner/buckets.go +++ b/runner/buckets.go @@ -1,14 +1,18 @@ package runner +import "github.com/rudderlabs/rudder-go-kit/bytesize" + var customBuckets = map[string][]float64{ "gateway.request_size": { - 10, // 10 bytes - 100, // 100 bytes - 1000, // 1kb - 10000, // 10kb - 100000, // 100kb - 1000000, // 1mb - 10000000, // 10mb + float64(10 * bytesize.B), + float64(100 * bytesize.B), + float64(1 * bytesize.KB), + float64(10 * bytesize.KB), + float64(100 * bytesize.KB), + float64(1 * bytesize.MB), + float64(3 * bytesize.MB), + float64(5 * bytesize.MB), + float64(10 * bytesize.MB), }, "gateway.response_time": { 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 60,