From b4d860196ac43ec2e04a044065f14f377d424055 Mon Sep 17 00:00:00 2001 From: Akash Chandra Date: Fri, 27 Dec 2024 18:53:47 +0530 Subject: [PATCH] fix: remove outdated hist for namespaces --- lib/live_cluster/client/node.py | 9 +++++++-- test/unit/live_cluster/client/test_node.py | 7 +++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/live_cluster/client/node.py b/lib/live_cluster/client/node.py index e74f0114..8b21c1a2 100644 --- a/lib/live_cluster/client/node.py +++ b/lib/live_cluster/client/node.py @@ -2065,9 +2065,11 @@ 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", @@ -2075,15 +2077,18 @@ async def info_latencies( "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 diff --git a/test/unit/live_cluster/client/test_node.py b/test/unit/live_cluster/client/test_node.py index 7b43f922..81beb6c6 100644 --- a/test/unit/live_cluster/client/test_node.py +++ b/test/unit/live_cluster/client/test_node.py @@ -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