From fe41c1a651d5098b55c138da3f0f5fb028f95c9b Mon Sep 17 00:00:00 2001 From: Dan Hess Date: Tue, 14 Jul 2020 14:14:53 -0500 Subject: [PATCH] Fix cpu count (Python has GIL, cannot use more than one CPU) --- cogs/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/misc.py b/cogs/misc.py index 03ac4c2..7a386e7 100644 --- a/cogs/misc.py +++ b/cogs/misc.py @@ -38,7 +38,7 @@ def _command_signature(cmd): return ' '.join(result) -class Miscallaneous(commands.Cog): +class Miscellaneous(commands.Cog): """Core commands, these are the miscallaneous commands that don't fit into other categories'""" process = psutil.Process() process.cpu_percent() @@ -236,7 +236,7 @@ class Miscallaneous(commands.Cog): value = "" memory_usage = self.process.memory_full_info().uss / 1024 ** 2 - cpu_usage = self.process.cpu_percent() / psutil.cpu_count() + cpu_usage = self.process.cpu_percent() value += 'Memory: {:.2f} MiB'.format(memory_usage) value += '\nCPU: {}%'.format(cpu_usage) if hasattr(ctx.bot, 'uptime'):