mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-30 04:29:05 +00:00
cleanup
This commit is contained in:
@@ -53,6 +53,7 @@ import com.volmit.iris.util.io.InstanceState;
|
||||
import com.volmit.iris.util.io.JarScanner;
|
||||
import com.volmit.iris.util.math.M;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.misc.getHardware;
|
||||
import com.volmit.iris.util.parallel.MultiBurst;
|
||||
import com.volmit.iris.util.plugin.IrisService;
|
||||
import com.volmit.iris.util.plugin.Metrics;
|
||||
@@ -778,7 +779,6 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
String[] splash = unstablemode ? splashunstable : splashstable; // Choose the appropriate splash array based on unstablemode
|
||||
|
||||
|
||||
long maxMemory = Runtime.getRuntime().maxMemory() / (1024 * 1024);
|
||||
OperatingSystemMXBean osBean = ManagementFactory.getOperatingSystemMXBean();
|
||||
String osArch = osBean.getArch();
|
||||
String osName = osBean.getName();
|
||||
@@ -791,8 +791,8 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
if(unstablemode) Iris.info("Server Cpu: " + C.RED + getCPUModel());
|
||||
if(!unstablemode) Iris.info("Server Cpu: " + C.BLUE + getCPUModel());
|
||||
Iris.info("Process Threads: " + getCPUThreads());
|
||||
Iris.info("Process Memory: " + maxMemory + " MB");
|
||||
if (maxMemory < 5999) {
|
||||
Iris.info("Process Memory: " + getHardware.getProcessMemory() + " MB");
|
||||
if (getHardware.getProcessMemory() < 5999) {
|
||||
Iris.warn("6GB+ Ram is recommended");
|
||||
}
|
||||
Iris.info("Bukkit version: " + Bukkit.getBukkitVersion());
|
||||
|
||||
@@ -281,6 +281,7 @@ public class CommandStudio implements DecreeExecutor {
|
||||
@Param(description = "The dimension to profile", contextual = true, defaultValue = "default")
|
||||
IrisDimension dimension
|
||||
) {
|
||||
// Todo: Make this more accurate
|
||||
File pack = dimension.getLoadFile().getParentFile().getParentFile();
|
||||
File report = Iris.instance.getDataFile("profile.txt");
|
||||
IrisProject project = new IrisProject(pack);
|
||||
|
||||
@@ -12,6 +12,9 @@ public class PerformanceSFG {
|
||||
if (getCPUModel().contains("Xeon")){
|
||||
lowPerformance = true;
|
||||
}
|
||||
if (getProcessMemory() < 5999){
|
||||
lowPerformance = true;
|
||||
}
|
||||
|
||||
// Todo RePixelated: Finish this
|
||||
}
|
||||
|
||||
@@ -18,6 +18,10 @@ public class getHardware {
|
||||
CentralProcessor processor = systemInfo.getHardware().getProcessor();
|
||||
return processor.getLogicalProcessorCount();
|
||||
}
|
||||
public static long getProcessMemory(){
|
||||
long maxMemory = Runtime.getRuntime().maxMemory() / (1024 * 1024);
|
||||
return maxMemory;
|
||||
}
|
||||
|
||||
public static String getCPUModel() {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user