From 51d791fcc69a368f0fbe75dccf63fd2596af40c6 Mon Sep 17 00:00:00 2001 From: Slackadays <69403549+Slackadays@users.noreply.github.com> Date: Sat, 12 Feb 2022 19:11:12 -0500 Subject: [PATCH] Add keys for pagefaults --- source/en.hpp | 4 ++++ source/languages.hpp | 4 ++++ source/server_features.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/source/en.hpp b/source/en.hpp index 2479cbf..7278f22 100644 --- a/source/en.hpp +++ b/source/en.hpp @@ -246,6 +246,8 @@ server.command.perf.key.cpumigrations = "CPU migrations"; server.command.perf.key.ipc = "IPC"; server.command.perf.key.cps = "CPS"; server.command.perf.key.ips = "IPS"; +server.command.perf.key.minorpagefaults = "minor pagefaults"; +server.command.perf.key.majorpagefaults = "major pagefaults"; server.command.perf.key.contextswitches = "context switches"; server.command.perf.key.stalledfrontend = "stalled cycles frontend"; server.command.perf.key.stalledbackend = "stalled cycles backend"; @@ -267,6 +269,8 @@ server.command.perf.value.cpumigrations = "Show how many times the scheduler mov server.command.perf.value.ipc = "Show the Instructions Per Clock (IPC) measurement."; server.command.perf.value.cps = "Show the Cycles Per Second (CPS) measurement."; server.command.perf.value.ips = "Show the Instructions Per Second (IPS) measurement."; +server.command.perf.value.minorpagefaults = "How many times the CPU wanted to access a memory page that was not available, and did not require disk I/O to fix."; +server.command.perf.value.majorpagefaults = "How many times the CPU wanted to access a memory page that was not available, and did require disk I/O to fix."; server.command.perf.value.contextswitches = "Show how many times the kernel switched the current context of execution on the CPU to or from the server's process."; server.command.perf.value.stalledfrontend = "Show how many cycles the CPU spent waiting on undecoded instructions to be decoded."; server.command.perf.value.stalledbackend = "Show how many cycles the CPU spent waiting on instructions while executing them."; diff --git a/source/languages.hpp b/source/languages.hpp index 9baa6a4..78bd12c 100644 --- a/source/languages.hpp +++ b/source/languages.hpp @@ -329,6 +329,8 @@ class Text { string ipc; string cps; string ips; + string minorpagefaults; + string majorpagefaults; string contextswitches; string stalledfrontend; string stalledbackend; @@ -353,6 +355,8 @@ class Text { string ipc; string cps; string ips; + string minorpagefaults; + string majorpagefaults; string contextswitches; string stalledfrontend; string stalledbackend; diff --git a/source/server_features.cpp b/source/server_features.cpp index 7fd7b6f..81441c3 100644 --- a/source/server_features.cpp +++ b/source/server_features.cpp @@ -209,8 +209,8 @@ void Server::commandPerf() { "{\"text\":\"" + text.server.command.perf.key.ipc + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + text.server.command.perf.value.ipc + "\"}}," "{\"text\":\"" + text.server.command.perf.key.cps + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + text.server.command.perf.value.cps + "\"}}," "{\"text\":\"" + text.server.command.perf.key.ips + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + text.server.command.perf.value.ips + "\"}}," - "{\"text\":\"" + "minor pagefaults" + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + string("How many times the CPU wanted to access a memory page that was not available, and did not require disk I/O to fix.") + "\"}}," - "{\"text\":\"" + "major pagefaults" + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + string("How many times the CPU wanted to access a memory page that was not available, and did require disk I/O to fix.") + "\"}}," + "{\"text\":\"" + text.server.command.perf.key.minorpagefaults + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + text.server.command.perf.value.minorpagefaults + "\"}}," + "{\"text\":\"" + text.server.command.perf.key.majorpagefaults + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + text.server.command.perf.value.majorpagefaults + "\"}}," "{\"text\":\"" + text.server.command.perf.key.contextswitches + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + text.server.command.perf.value.contextswitches + "\"}}," "{\"text\":\"" + text.server.command.perf.key.stalledfrontend + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + text.server.command.perf.value.stalledfrontend + "\"}}," "{\"text\":\"" + text.server.command.perf.key.stalledbackend + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + text.server.command.perf.value.stalledbackend + "\"}}," @@ -250,8 +250,8 @@ void Server::commandSWPerf() { "{\"text\":\"" + text.server.command.perf.key.cpumigrations + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + getCPUmigs() + "\"}}," "{\"text\":\"" + text.server.command.perf.key.emufaults + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + getEmulationFaults() + "\"}}," "{\"text\":\"" + text.server.command.perf.key.alignfaults + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + getAlignmentFaults() + "\"}}," - "{\"text\":\"" + string("minor pagefaults") + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + getMinorPagefaults() + "\"}}," - "{\"text\":\"" + string("major pagefaults") + "\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + getMajorPagefaults() + "\"}}]"; + "{\"text\":\"" + text.server.command.perf.key.minorpagefaults + ", \",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + getMinorPagefaults() + "\"}}," + "{\"text\":\"" + text.server.command.perf.key.majorpagefaults + "\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":\"§b" + getMajorPagefaults() + "\"}}]"; writeToServerTerminal(formatWrapper(hajInfo)); }