Skip to content
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

Merged
merged 8 commits into from
Nov 30, 2023
Merged

Om86 #101

merged 8 commits into from
Nov 30, 2023

Conversation

mphanias
Copy link
Contributor

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

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
fixed lint errors
@mphanias mphanias requested review from sunilvirus and hev November 23, 2023 14:21
}
}
// 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"
Copy link
Member

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.

@@ -56,10 +60,25 @@ func (lw *LatencyWatcher) refresh(o *Observer, infoKeys []string, rawMetrics map
}
}

// loop all the latency infokeys
for ik := range infoKeys {
Copy link
Member

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.

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
Copy link
Member

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.

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
Copy link
Member

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
Copy link
Member

@sunilvirus sunilvirus left a 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.

@sunilvirus sunilvirus merged commit aab0b97 into dev Nov 30, 2023
1 check passed
@sunilvirus sunilvirus deleted the OM86 branch November 30, 2023 08:55
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