Skip to content

Commit 2dc1870

Browse files
committed
Increase data used in benchmark
Signed-off-by: Arthur Silva Sens <[email protected]>
1 parent 014c812 commit 2dc1870

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

exporter/prometheusremotewriteexporter/exporter_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,7 @@ func BenchmarkPushMetricsVaryingMetrics(b *testing.B) {
12891289
}
12901290

12911291
// benchmarkPushMetrics benchmarks the PushMetrics method with a given number of metrics.
1292-
// If numMetrics is -1, it will benchmark with varying number of metrics, from 10 up to 10000.
1292+
// If numMetrics is -1, it will benchmark with varying number of metrics, from 100 up to 1000000.
12931293
func benchmarkPushMetrics(b *testing.B, numMetrics, numConsumers int) {
12941294
mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
12951295
w.WriteHeader(http.StatusOK)
@@ -1327,9 +1327,12 @@ func benchmarkPushMetrics(b *testing.B, numMetrics, numConsumers int) {
13271327
for n := 0; n < b.N; n++ {
13281328
actualNumMetrics := numMetrics
13291329
if numMetrics == -1 {
1330-
actualNumMetrics = int(math.Pow(10, float64(n%4+1)))
1330+
actualNumMetrics = int(math.Pow(100, float64(n%3+1)))
13311331
}
13321332
m := testdata.GenerateMetricsManyMetricsSameResource(actualNumMetrics)
1333+
for i := 0; i < m.MetricCount(); i++ {
1334+
m.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(i).Sum().DataPoints().AppendEmpty().SetIntValue(int64(i))
1335+
}
13331336
metrics = append(metrics, m)
13341337
}
13351338

0 commit comments

Comments
 (0)