Minor clean-up in OsUtils

* fix typo in method names
 * add a test for the other *toHumanReadable method
 * replace StringBuilder usage with simple concatenation
   where applicable (for fixed length strings)
This commit is contained in:
Petr Široký
2023-03-10 22:44:49 +01:00
committed by Guillaume Nodet
parent 3657375e97
commit e1815e52a3
4 changed files with 31 additions and 25 deletions

View File

@@ -270,7 +270,7 @@ public class DefaultClient implements Client {
d.getPid(),
d.getAddress(),
d.getState(),
OsUtils.kbTohumanReadable(OsUtils.findProcessRssInKb(d.getPid())),
OsUtils.kbToHumanReadable(OsUtils.findProcessRssInKb(d.getPid())),
LocalDateTime.ofInstant(
Instant.ofEpochMilli(Math.max(d.getLastIdle(), d.getLastBusy())),
ZoneId.systemDefault()),