-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(server): add total_connections_received statistics #757
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it unit-testable?
src/server/server_family.cc
Outdated
} | ||
sort(display.begin(), display.end()); | ||
|
||
for (const auto& k_v : display) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract to function AppendSorted(... ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IsI meant the entire thing :)
Also I'd move to a non lambda that does
reserve
push each
Sort
append each (to output)
It is an extra reserve call but much more readable IMHO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit problematic because the source maps have a bit different types. Pulling lambda out will create a weird template function that is used in a single place - here. I thought it's not worth the complexity but if you insist I can do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in matter of fact, append
is also a lambda function so it will be pretty complicated to introduce something well defined outside of the scope of Info function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it unit-testable?
we currently do not have testing infra structure to cover Info call |
In addition: 1. improve logging of received commands 2. provide stable ordering of error stats and commandstats Signed-off-by: Roman Gershman <roman@dragonflydb.io>
In addition:
Signed-off-by: Roman Gershman roman@dragonflydb.io