Skip to content

Commit

Permalink
Add keys for pagefaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Slackadays authored Feb 13, 2022
1 parent 39ecedc commit 51d791f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions source/en.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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.";
Expand Down
4 changes: 4 additions & 0 deletions source/languages.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ class Text {
string ipc;
string cps;
string ips;
string minorpagefaults;
string majorpagefaults;
string contextswitches;
string stalledfrontend;
string stalledbackend;
Expand All @@ -353,6 +355,8 @@ class Text {
string ipc;
string cps;
string ips;
string minorpagefaults;
string majorpagefaults;
string contextswitches;
string stalledfrontend;
string stalledbackend;
Expand Down
8 changes: 4 additions & 4 deletions source/server_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 + "\"}},"
Expand Down Expand Up @@ -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));
}

Expand Down

0 comments on commit 51d791f

Please sign in to comment.