1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Add cpu/memory usage to info command

This commit is contained in:
Phxntxm 2017-04-20 22:04:48 -05:00
parent 6199d867dc
commit 50cca0c7ff

View file

@ -211,7 +211,7 @@ class Core:
memory_usage = self.process.memory_full_info().uss / 1024**2
cpu_usage = self.process.cpu_percent() / psutil.cpu_count()
embed.add_field(name='Memory Usage', value='{:.2f} MiB'.format(memory_usage))
emebd.add_field(name='CPU Usage', value='{}%'.format(cpu_usage))
embed.add_field(name='CPU Usage', value='{}%'.format(cpu_usage))
embed.set_footer(text=self.bot.description)
await ctx.send(embed=embed)