forked from MinecraftUtilities/Backend
update memory metric
This commit is contained in:
parent
d8d4f32006
commit
8f758820e1
@ -18,7 +18,8 @@ public class MemoryMetric extends MapMetric<String, Long> {
|
|||||||
public void collect() {
|
public void collect() {
|
||||||
Runtime runtime = Runtime.getRuntime();
|
Runtime runtime = Runtime.getRuntime();
|
||||||
|
|
||||||
this.getValue().put("total", runtime.totalMemory());
|
this.getValue().put("total", runtime.maxMemory());
|
||||||
|
this.getValue().put("allocated", runtime.totalMemory());
|
||||||
this.getValue().put("used", runtime.totalMemory() - runtime.freeMemory());
|
this.getValue().put("used", runtime.totalMemory() - runtime.freeMemory());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user