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

TOOLS-2669 TOOLS-2683 TOOLS-2705 TOOLS-2706 7.0 config/stats changes #218

Merged
merged 16 commits into from
Oct 19, 2023
2 changes: 2 additions & 0 deletions lib/collectinfo_analyzer/info_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,15 @@ def _do_default(self, line):
@CommandHelp("Displays usage information for each namespace")
def do_usage(self, line):
ns_stats = self.stat_getter.get_namespace()
service_stats = self.stat_getter.get_service()

for timestamp in sorted(ns_stats.keys()):
if not ns_stats[timestamp]:
continue

self.view.info_namespace_usage(
ns_stats[timestamp],
service_stats[timestamp],
self.log_handler.get_cinfo_log_at(timestamp=timestamp),
timestamp=timestamp,
**self.mods,
Expand Down
142 changes: 103 additions & 39 deletions lib/health/query.py

Large diffs are not rendered by default.

154 changes: 108 additions & 46 deletions lib/health/query/health.hql

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions lib/live_cluster/info_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ class InfoNamespaceController(LiveClusterCommandController):
def __init__(self, get_futures=False):
self.modifiers = set(["with"])
self.get_futures = get_futures
self.stats_getter = GetStatisticsController(self.cluster)

@CommandHelp(
"Displays usage and objects information for each namespace",
Expand All @@ -259,9 +260,16 @@ async def _do_default(self, line):
modifiers=(with_modifier_help,),
)
async def do_usage(self, line):
stats = await self.cluster.info_all_namespace_statistics(nodes=self.nodes)
service_stats, ns_stats = await asyncio.gather(
self.stats_getter.get_service(nodes=self.nodes),
self.stats_getter.get_namespace(nodes=self.nodes),
) # Includes stats and configs
return util.callable(
self.view.info_namespace_usage, stats, self.cluster, **self.mods
self.view.info_namespace_usage,
ns_stats,
service_stats,
self.cluster,
**self.mods,
)

@CommandHelp(
Expand Down
1 change: 0 additions & 1 deletion lib/live_cluster/show_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,6 @@ def __init__(self):
)
async def _do_default(self, line):
return await asyncio.gather(
self.do_bins(line[:]),
self.do_sets(line[:]),
self.do_service(line[:]),
self.do_namespace(line[:]),
Expand Down
Loading