-
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 <andre.branchizio@shopify.com> Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> Using the cache in proxy and tsdb stores (only receiver) Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> fixing problem with deep equality Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> adding some docs Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> Adding benchmark Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> undo unecessary changes Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> Adjusting metric names Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> adding changelog Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> wiring changes to the receiver Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> Fixing linting Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> docs Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * using singleflight to get or set items Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * improve metrics Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * Introduce interface for matchers cache Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * fixing unit test Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * adding changelog Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * fixing benchmark Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * moving matcher cache to storecache package Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * Trying to make the cache more reusable introducing interface Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> Fixing problem with wrong initialization Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> Moving interface to storecache package Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> remove empty file and fix calls to constructor passing nil; Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com> * Fix false entry on change log Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * Removing default value for registry and rename test file Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * Using fmt.Errf() Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * Remove method that is not on interface anymore Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> * Remove duplicate get call Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> --------- Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com> Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
- 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.