Add memory summary.
This commit is contained in:
parent
c5fbc1a182
commit
b772349f69
13 changed files with 23 additions and 1209 deletions
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "Console.h"
|
||||
#include "Cpu.h"
|
||||
#include "Mem.h"
|
||||
#include "Options.h"
|
||||
#include "Summary.h"
|
||||
#include "version.h"
|
||||
|
@ -51,6 +52,18 @@ static void print_versions()
|
|||
}
|
||||
|
||||
|
||||
static void print_memory() {
|
||||
if (Options::i()->colors()) {
|
||||
Console::i()->text("\x1B[01;32m * \x1B[01;37mHUGE PAGES: %s, %s",
|
||||
Mem::isHugepagesAvailable() ? "\x1B[01;32mavailable" : "\x1B[01;31munavailable",
|
||||
Mem::isHugepagesEnabled() ? "\x1B[01;32menabled" : "\x1B[01;31mdisabled");
|
||||
}
|
||||
else {
|
||||
Console::i()->text(" * HUGE PAGES: %s, %s", Mem::isHugepagesAvailable() ? "available" : "unavailable", Mem::isHugepagesEnabled() ? "enabled" : "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void print_cpu()
|
||||
{
|
||||
if (Options::i()->colors()) {
|
||||
|
@ -104,6 +117,7 @@ static void print_threads()
|
|||
void Summary::print()
|
||||
{
|
||||
print_versions();
|
||||
print_memory();
|
||||
print_cpu();
|
||||
print_threads();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue