Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-19 14:30:17 +01:00
Move MEGABYTE to a constant (#1059)
Dieser Commit ist enthalten in:
Ursprung
0c3a6f1a6a
Commit
118747c66b
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
package org.geysermc.connector.dump;
|
package org.geysermc.connector.dump;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.github.steveice10.mc.protocol.MinecraftConstants;
|
import com.github.steveice10.mc.protocol.MinecraftConstants;
|
||||||
import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||||
@ -47,6 +48,9 @@ import java.util.Properties;
|
|||||||
@Getter
|
@Getter
|
||||||
public class DumpInfo {
|
public class DumpInfo {
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
private static final long MEGABYTE = 1024L * 1024L;
|
||||||
|
|
||||||
private final DumpInfo.VersionInfo versionInfo;
|
private final DumpInfo.VersionInfo versionInfo;
|
||||||
private Properties gitInfo;
|
private Properties gitInfo;
|
||||||
private final GeyserConfiguration config;
|
private final GeyserConfiguration config;
|
||||||
@ -148,8 +152,6 @@ public class DumpInfo {
|
|||||||
private final long max;
|
private final long max;
|
||||||
|
|
||||||
RamInfo() {
|
RamInfo() {
|
||||||
final long MEGABYTE = 1024L * 1024L;
|
|
||||||
|
|
||||||
this.free = Runtime.getRuntime().freeMemory() / MEGABYTE;
|
this.free = Runtime.getRuntime().freeMemory() / MEGABYTE;
|
||||||
this.total = Runtime.getRuntime().totalMemory() / MEGABYTE;
|
this.total = Runtime.getRuntime().totalMemory() / MEGABYTE;
|
||||||
this.max = Runtime.getRuntime().maxMemory() / MEGABYTE;
|
this.max = Runtime.getRuntime().maxMemory() / MEGABYTE;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren