diff options
Diffstat (limited to 'patches/server/0012-Timings-v2.patch')
-rw-r--r-- | patches/server/0012-Timings-v2.patch | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/patches/server/0012-Timings-v2.patch b/patches/server/0012-Timings-v2.patch index abba84bfd5..d1d307820f 100644 --- a/patches/server/0012-Timings-v2.patch +++ b/patches/server/0012-Timings-v2.patch @@ -163,10 +163,10 @@ index 0000000000000000000000000000000000000000..b47b7dce26805badd422c1867733ff4b +} diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java new file mode 100644 -index 0000000000000000000000000000000000000000..ee53453440177537fc653ea156785d7591498614 +index 0000000000000000000000000000000000000000..ee72086b2dee2bd6415803e77825b2b1cb83cd3d --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsExport.java -@@ -0,0 +1,376 @@ +@@ -0,0 +1,383 @@ +/* + * This file is licensed under the MIT License (MIT). + * @@ -204,6 +204,8 @@ index 0000000000000000000000000000000000000000..ee53453440177537fc653ea156785d75 +import org.bukkit.entity.EntityType; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; ++import oshi.SystemInfo; ++import oshi.hardware.HardwareAbstractionLayer; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; @@ -295,12 +297,16 @@ index 0000000000000000000000000000000000000000..ee53453440177537fc653ea156785d75 + + OperatingSystemMXBean osInfo = ManagementFactory.getOperatingSystemMXBean(); + ++ HardwareAbstractionLayer hardwareInfo = new SystemInfo().getHardware(); ++ + parent.put("system", createObject( + pair("timingcost", getCost()), + pair("loadavg", osInfo.getSystemLoadAverage()), + pair("name", System.getProperty("os.name")), + pair("version", System.getProperty("os.version")), + pair("jvmversion", System.getProperty("java.version")), ++ pair("jvmvendor", System.getProperty("java.vendor")), ++ pair("jvmvendorversion", System.getProperty("java.vendor.version")), + pair("arch", System.getProperty("os.arch")), + pair("maxmem", runtime.maxMemory()), + pair("memory", createObject( @@ -309,6 +315,7 @@ index 0000000000000000000000000000000000000000..ee53453440177537fc653ea156785d75 + pair("finalizing", ManagementFactory.getMemoryMXBean().getObjectPendingFinalizationCount()) + )), + pair("cpu", runtime.availableProcessors()), ++ pair("cpuname", hardwareInfo.getProcessor().getProcessorIdentifier().getName().trim()), + pair("runtime", runtimeBean.getUptime()), + pair("flags", StringUtils.join(runtimeBean.getInputArguments(), " ")), + pair("gc", toObjectMapper(ManagementFactory.getGarbageCollectorMXBeans(), input -> pair(input.getName(), toArray(input.getCollectionCount(), input.getCollectionTime())))) |