Skip to content

Commit

Permalink
OM-209 - latencies command is not working
Browse files Browse the repository at this point in the history
this issue is occuring because namespace is append to the latencies command with a "-" and "-" (hypen) is part of the latency command itself, because of this command is constructed wrongly.
a quick fix is use a separator which is not part of server command or output like "-","_",":" etc.,
  • Loading branch information
mphanias committed Oct 24, 2024
1 parent 4c9c17d commit 4ba93a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/pkg/statprocessors/sp_latency.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (lw *LatencyStatsProcessor) getLatenciesCommands(rawMetrics map[string]stri
//
// Hashmap content format := namespace-<histogram-key> = <0/1>
for latencyHistName := range LatencyBenchmarks {
histTokens := strings.Split(latencyHistName, "-")
histTokens := strings.Split(latencyHistName, "~")

histCommand := "latencies:hist="

Expand All @@ -70,7 +70,7 @@ func (lw *LatencyStatsProcessor) getLatenciesCommands(rawMetrics map[string]stri
commands = append(commands, histCommand)
}

log.Tracef("latency-passtwokeys:%s", commands)
log.Tracef("latency-getLatenciesCommands:%s", commands)

return commands
}
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/statprocessors/sp_namespaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ func (nw *NamespaceStatsProcessor) refreshNamespaceStats(singleInfoKey string, i
//
// check and if latency benchmarks stat - is it enabled (bool true==1 and false==0 after conversion)
if isStatLatencyHistRelated(stat) {
delete(LatencyBenchmarks, nsName+"-"+stat)
delete(LatencyBenchmarks, nsName+"~"+stat)

if pv == 1 {
LatencyBenchmarks[nsName+"-"+stat] = stat
LatencyBenchmarks[nsName+"~"+stat] = stat
}
}

Expand Down

0 comments on commit 4ba93a1

Please sign in to comment.