-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Receiver: cache matchers for series calls (#7353)
* Receiver: cache matchers for series calls We have tried caching matchers before with a time-based expiration cache, this time we are trying with LRU cache. We saw some of our receivers busy with compiling regexes and with high CPU usage, similar to the profile of the benchmark I added here: * Adding matcher cache for method `MatchersToPromMatchers` and a new version which uses the cache. * The main change is in `matchesExternalLabels` function which now receives a cache instance. adding matcher cache and refactor matchers Co-authored-by: Andre Branchizio <[email protected]> Signed-off-by: Pedro Tanaka <[email protected]> Using the cache in proxy and tsdb stores (only receiver) Signed-off-by: Pedro Tanaka <[email protected]> fixing problem with deep equality Signed-off-by: Pedro Tanaka <[email protected]> adding some docs Signed-off-by: Pedro Tanaka <[email protected]> Adding benchmark Signed-off-by: Pedro Tanaka <[email protected]> undo unecessary changes Signed-off-by: Pedro Tanaka <[email protected]> Adjusting metric names Signed-off-by: Pedro Tanaka <[email protected]> adding changelog Signed-off-by: Pedro Tanaka <[email protected]> wiring changes to the receiver Signed-off-by: Pedro Tanaka <[email protected]> Fixing linting Signed-off-by: Pedro Tanaka <[email protected]> docs Signed-off-by: Pedro Tanaka <[email protected]> * using singleflight to get or set items Signed-off-by: Pedro Tanaka <[email protected]> * improve metrics Signed-off-by: Pedro Tanaka <[email protected]> * Introduce interface for matchers cache Signed-off-by: Pedro Tanaka <[email protected]> * fixing unit test Signed-off-by: Pedro Tanaka <[email protected]> * adding changelog Signed-off-by: Pedro Tanaka <[email protected]> * fixing benchmark Signed-off-by: Pedro Tanaka <[email protected]> * moving matcher cache to storecache package Signed-off-by: Pedro Tanaka <[email protected]> * Trying to make the cache more reusable introducing interface Signed-off-by: Pedro Tanaka <[email protected]> Fixing problem with wrong initialization Signed-off-by: Pedro Tanaka <[email protected]> Moving interface to storecache package Signed-off-by: Pedro Tanaka <[email protected]> remove empty file and fix calls to constructor passing nil; Signed-off-by: Pedro Tanaka <[email protected]> * Fix false entry on change log Signed-off-by: Pedro Tanaka <[email protected]> * Removing default value for registry and rename test file Signed-off-by: Pedro Tanaka <[email protected]> * Using fmt.Errf() Signed-off-by: Pedro Tanaka <[email protected]> * Remove method that is not on interface anymore Signed-off-by: Pedro Tanaka <[email protected]> * Remove duplicate get call Signed-off-by: Pedro Tanaka <[email protected]> --------- Signed-off-by: Pedro Tanaka <[email protected]> Signed-off-by: Pedro Tanaka <[email protected]>
- Loading branch information
1 parent
ca40906
commit 626d0e5
Showing
17 changed files
with
478 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.