Skip to content

Commit

Permalink
fix: remove outdated hist for namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
a-spiker committed Dec 27, 2024
1 parent 81901d0 commit b4d8601
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 7 additions & 2 deletions lib/live_cluster/client/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -2065,25 +2065,30 @@ async def info_latencies(
namespaces = (await self._info("namespaces")).split(";")
except Exception:
return data

micro_benchmarks = [
"proxy",
"benchmarks-fabric",
"read-touch",
"re-repl",
"benchmarks-ops-sub",
"benchmarks-read",
"benchmarks-write",
"benchmarks-udf",
"benchmarks-udf-sub",
"benchmarks-batch-sub",
]

cmd_latencies += [
"latencies:hist={%s}-%s" % (ns, optional)
for ns in namespaces
for optional in micro_benchmarks
]

hist_info = []
for cmd in cmd_latencies:
try:
resp = await self._info(cmd)
info_resp[cmd] = resp
hist_info.append(await self._info(cmd))
except Exception:
return data
Expand Down
7 changes: 5 additions & 2 deletions test/unit/live_cluster/client/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1743,11 +1743,14 @@ async def test_info_latencies_verbose(self):

_ = await self.node.info_latencies(verbose=True)

self.assertEqual(self.info_mock.call_count, 10)
self.assertEqual(self.info_mock.call_count, 11)
self.info_mock.assert_any_call("latencies:", self.ip)
self.info_mock.assert_any_call("latencies:hist={test}-proxy", self.ip)
self.info_mock.assert_any_call(
"latencies:hist={test}-benchmarks-fabric", self.ip
"latencies:hist={test}-read-touch", self.ip
)
self.info_mock.assert_any_call(
"latencies:hist={test}-re-repl", self.ip
)
self.info_mock.assert_any_call(
"latencies:hist={test}-benchmarks-ops-sub", self.ip
Expand Down

0 comments on commit b4d8601

Please sign in to comment.