mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-28 04:02:21 -04:00
[TEST] TSDB: More realistic BenchmarkIntersect
100,000 matchers is not something that could happen while using Prometheus. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
2605fc9984
commit
393ab9e12e
1 changed files with 3 additions and 3 deletions
|
|
@ -347,13 +347,13 @@ func BenchmarkIntersect(t *testing.B) {
|
|||
}
|
||||
})
|
||||
|
||||
// Many matchers(k >> n).
|
||||
// Many matchers.
|
||||
t.Run("ManyPostings", func(bench *testing.B) {
|
||||
var lps []*ListPostings
|
||||
var refs [][]storage.SeriesRef
|
||||
|
||||
// Create 100000 matchers(k=100000), making sure all memory allocation is done before starting the loop.
|
||||
for range 100000 {
|
||||
// Create 100 matchers, making sure all memory allocation is done before starting the loop.
|
||||
for range 100 {
|
||||
var temp []storage.SeriesRef
|
||||
for j := storage.SeriesRef(1); j < 100; j++ {
|
||||
temp = append(temp, j)
|
||||
|
|
|
|||
Loading…
Reference in a new issue