mirror of
https://github.com/prometheus/prometheus.git
synced 2026-02-03 20:39:32 -05:00
Revert "storage: add BenchmarkFanoutAppenderV2"
Some checks failed
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (push) Has been cancelled
CI / Build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Some checks failed
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (push) Has been cancelled
CI / Build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
This reverts commit 91b0f353b0.
This commit is contained in:
parent
91b0f353b0
commit
6c18bba5c6
1 changed files with 0 additions and 36 deletions
|
|
@ -16,7 +16,6 @@ package storage_test
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/prometheus/common/model"
|
||||
|
|
@ -564,38 +563,3 @@ func TestFanoutAppenderV2(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Recommended CLI invocation:
|
||||
/*
|
||||
export bench=fanoutAppender && go test ./storage/... \
|
||||
-run '^$' -bench '^BenchmarkFanoutAppenderV2' \
|
||||
-benchtime 2s -count 6 -cpu 2 -timeout 999m \
|
||||
| tee ${bench}.txt
|
||||
*/
|
||||
func BenchmarkFanoutAppenderV2(b *testing.B) {
|
||||
ex := exemplar.Exemplar{Value: 1}
|
||||
|
||||
var series []labels.Labels
|
||||
for i := range 1000 {
|
||||
series = append(series, labels.FromStrings(model.MetricNameLabel, "metric1", "i", strconv.Itoa(i)))
|
||||
}
|
||||
for _, tt := range fanoutAppenderTestCases(nil) {
|
||||
b.Run(tt.name, func(b *testing.B) {
|
||||
f := storage.NewFanout(nil, mockStorage{appV2: tt.primary}, mockStorage{appV2: tt.secondary})
|
||||
|
||||
b.ReportAllocs()
|
||||
b.ResetTimer()
|
||||
for b.Loop() {
|
||||
app := f.AppenderV2(b.Context())
|
||||
for _, s := range series {
|
||||
// Purposefully skip errors as we want to benchmark error cases too (majority of the fanout logic).
|
||||
_, _ = app.Append(0, s, 0, 0, 1, nil, nil, storage.AOptions{
|
||||
Exemplars: []exemplar.Exemplar{ex},
|
||||
})
|
||||
}
|
||||
require.NoError(b, app.Rollback())
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue