Skip to content

stats: Recent lookups implementation#8376

Merged
jmarantz merged 9 commits intoenvoyproxy:masterfrom
jmarantz:recent-lookups-impl
Oct 1, 2019
Merged

stats: Recent lookups implementation#8376
jmarantz merged 9 commits intoenvoyproxy:masterfrom
jmarantz:recent-lookups-impl

Conversation

@jmarantz
Copy link
Copy Markdown
Contributor

@jmarantz jmarantz commented Sep 25, 2019

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

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz jmarantz changed the title WiP stats: Recent lookups implementation stats: Recent lookups implementation Sep 25, 2019
@jmarantz jmarantz marked this pull request as ready for review September 25, 2019 22:30
…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>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz
Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks looks great with 2 small nits.

/wait


struct ItemCount {
std::string item_;
int64_t count_;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: uint64_t

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jmarantz
Copy link
Copy Markdown
Contributor Author

jmarantz commented Oct 1, 2019

/retest

@repokitteh-read-only
Copy link
Copy Markdown

🔨 rebuilding ci/circleci: release (failed build)

🐱

Caused by: a #8376 (comment) was created by @jmarantz.

see: more, trace.

@jmarantz jmarantz merged commit 27c7749 into envoyproxy:master Oct 1, 2019
@jmarantz jmarantz deleted the recent-lookups-impl branch October 1, 2019 12:18
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants