Commit graph

6 commits

Author SHA1 Message Date
Simon Pasquier d5d7a097e1 Update Makefile.common
This change also uses the latest staticcheck version which comes with
new verifications, hence some clean up in the code.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-04 16:08:43 +01:00
Brian Brazil 296f943ec4
More efficient Merge implementation. (#486)
Avoid a tree of merge objects, which can result in
what I suspect is n^2 calls to Seek when using Without.

With 100k metrics, and a regex of ^$ in BenchmarkHeadPostingForMatchers:

Before:
BenchmarkHeadPostingForMatchers-8              1        51633185216 ns/op      29745528 B/op      200357 allocs/op

After:
BenchmarkHeadPostingForMatchers-8             10         108924996 ns/op 25715025 B/op     101748 allocs/op

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-01-03 16:59:52 +00:00
Brian Brazil 407e12d051 Make MemPostings nested.
This saves memory, about a quarter of the size of the postings map
itself with high-cardinality labels (not including the post ids).

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2018-11-22 09:36:39 +00:00
Alexey Palazhchenko 64cce683cc gofmt -s.
Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@gmail.com>
2018-05-07 15:39:54 +03:00
Ganesh Vernekar 0fb73ed622 Changed recursion into iteration for removedPostings.Next() 2018-02-14 19:27:35 +05:30
Fabian Reinartz 67f0ca8f0e Move index and chunk encoders to own packages 2017-12-21 11:27:54 +01:00
Renamed from postings_test.go (Browse further)