stats: Recent lookups implementation#8376
Merged
jmarantz merged 9 commits intoenvoyproxy:masterfrom Oct 1, 2019
Merged
Conversation
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
…le; just iterate over indices. Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Contributor
Author
|
@envoyproxy/maintainers can someone self-assign for a first pass? It's really a very simple specialized LRU cache for the purpose of tracking down recently/frequently stat-names looked up by name, so they can be memoized at startup or otherwise dealt with. This is just a new class and its tests so it should be easy to review. |
mattklein123
requested changes
Sep 30, 2019
Member
mattklein123
left a comment
There was a problem hiding this comment.
Thanks looks great with 2 small nits.
/wait
source/common/stats/recent_lookups.h
Outdated
|
|
||
| struct ItemCount { | ||
| std::string item_; | ||
| int64_t count_; |
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Contributor
Author
|
/retest |
|
🔨 rebuilding |
danzh2010
pushed a commit
to danzh2010/envoy
that referenced
this pull request
Oct 4, 2019
* recent-lookups class impl & tests. Signed-off-by: Joshua Marantz <jmarantz@google.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description: Split from #8116 -- add and test an class to hold recent stats lookups by name. It makes a tiny LRU cache holding only a count of recent hits for a particular name. Once this and #8369 are merged then #8116 can pull these together to show recent-lookups as an admin endpoint.
Risk Level: low -- this is a new class that isn't used yet
Testing: //test/... and speed test
Docs Changes: n/a
Release Notes: n/a