-
Notifications
You must be signed in to change notification settings - Fork 21
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
Om86 #101
Om86 #101
Conversation
support for micro benchmarks issue micro-benchmark commands during latency-watcher passtwo keys namespace-watcher and node-watcher add respective namespace and service benchmark flags which are later consumed by latency-watcher
watcher_namespaces.go
Outdated
} | ||
} | ||
// append default re-repl, as this auto-enabled, but not coming as part of latencies, we need this as namespace is available only here | ||
LatencyBenchmarks[nsName+"-latency-hist-re-repl"] = "{" + nsName + "}-re-repl" |
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.
This should be done outside the for loop. isnt it ?
Else, it will get added again and again to the map.
Luckily this is not a bug as the same element gets added to the map.
watcher_latency.go
Outdated
@@ -56,10 +60,25 @@ func (lw *LatencyWatcher) refresh(o *Observer, infoKeys []string, rawMetrics map | |||
} | |||
} | |||
|
|||
// loop all the latency infokeys | |||
for ik := range infoKeys { |
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.
This can be simplified by directly accessing values in loop.
for _, key := range infoKeys {
...
use the key directly instead of accessing via the index again.
watcher_latency.go
Outdated
var commands = []string{"latencies:"} | ||
|
||
// below latency-command are added to the auto-enabled list, i.e. latencies: command | ||
// re-repl is auto-enabled, but not coming as part of latencies: list, hence we are adding it explicitly |
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.
re-repl comment here is not relevant anymore.
watcher_namespaces.go
Outdated
LatencyBenchmarks[nsName+"-"+stat] = stat | ||
} | ||
} | ||
// append default re-repl, as this auto-enabled, but not coming as part of latencies, we need this as namespace is available only here |
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.
Let not add this. Because once the server starts giving this by default, we will end up duplicating this. Else, we have to do a server version check and add extra logic.
removed - re-repl hist command modified the for loop removed unnecessary comments
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.
Review comments taken care of.
support for micro benchmarks
issue micro-benchmark commands during latency-watcher passtwo keys
namespace-watcher and node-watcher add respective namespace and service benchmark flags which are later consumed by latency-watcher