diff --git a/src/main/java/org/alvindimas05/lagassist/minebench/Approximate.java b/src/main/java/org/alvindimas05/lagassist/minebench/Approximate.java index 2c3b5ff..8fb8218 100644 --- a/src/main/java/org/alvindimas05/lagassist/minebench/Approximate.java +++ b/src/main/java/org/alvindimas05/lagassist/minebench/Approximate.java @@ -128,11 +128,13 @@ public void run() { cs.sendMessage(""); cs.sendMessage("§2§l⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛§f§l BENCHMARK RESULTS §2§l⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛"); cs.sendMessage(""); - cs.sendMessage(" §2✸ §fCPU Name: §e" + cpuname); + cs.sendMessage(" §2✸ §fCPU Name: §e" + cpuname); + cs.sendMessage(" §2✸ §fTotal Cores: §e" + br.getCores()); + cs.sendMessage(" §2✸ §fAvailable Cores: §e" + cores); cs.sendMessage(""); if (br.getOk()) { - cs.sendMessage(" §2✸ §fCPU Score: §e" + br.getStringifiedSth()); - cs.sendMessage(" §2✸ §fThread Score: §e" + br.getStringifiedTh()); + cs.sendMessage(" §2✸ §fCPU Score: §e" + br.getStringifiedSth(true)); + cs.sendMessage(" §2✸ §fThread Score: §e" + br.getStringifiedTh(true)); } else { // cs.sendMessage(" §eBenchmark feature coming soon!"); cs.sendMessage(" §cThere was an error getting the full benchmark results."); diff --git a/src/main/java/org/alvindimas05/lagassist/minebench/BenchResponse.java b/src/main/java/org/alvindimas05/lagassist/minebench/BenchResponse.java index 45916a4..9f3b439 100644 --- a/src/main/java/org/alvindimas05/lagassist/minebench/BenchResponse.java +++ b/src/main/java/org/alvindimas05/lagassist/minebench/BenchResponse.java @@ -14,6 +14,8 @@ public BenchResponse(int singlethread, int multithread, int thread, int cores, b this.thread = thread; this.cores = cores; this.ok = ok; + + } public boolean getOk() { @@ -36,10 +38,17 @@ public int getCores(){ return cores; } - public String getStringifiedSth() { + public String getStringifiedSth(boolean calculateByCores) { if (singlethread < 0) { return "Unknown Score"; } + + if(calculateByCores){ + return String.valueOf( + (int) (((double) SpecsGetter.getCores() / cores) * singlethread) + ); + } + return String.valueOf(singlethread); } @@ -50,10 +59,18 @@ public String getStringifiedMth() { return String.valueOf(multithread); } - public String getStringifiedTh() { + public String getStringifiedTh(boolean calculateByCores) { if (thread < 0) { return "Unknown Score"; } + + + if(calculateByCores){ + return String.valueOf( + (int) (((double) SpecsGetter.getCores() / cores) * thread) + ); + } + return String.valueOf(thread); }