Skip to content

Commit

Permalink
Remove peak memory usage statistic
Browse files Browse the repository at this point in the history
This statistics is not really useful and most of the time Docker engine returns null for it
  • Loading branch information
wendigo authored and findepi committed Jan 13, 2022
1 parent cc16a43 commit ab9962c
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ private Stats toStats(Statistics statistics, Stats previousStats)
MemoryStatsConfig memoryStats = statistics.getMemoryStats();
stats.memoryLimit = DataSize.ofBytes(firstNonNull(memoryStats.getLimit(), 0L)).to(GIGABYTE);
stats.memoryUsage = DataSize.ofBytes(firstNonNull(memoryStats.getUsage(), 0L)).to(GIGABYTE);
stats.memoryMaxUsage = DataSize.ofBytes(firstNonNull(memoryStats.getMaxUsage(), 0L)).to(GIGABYTE);
stats.memoryUsagePerc = 100.0 * firstNonNull(memoryStats.getUsage(), 0L) / firstNonNull(memoryStats.getLimit(), 1L);
stats.pids = firstNonNull(statistics.getPidsStats().getCurrent(), -1L);

Expand Down Expand Up @@ -190,7 +189,6 @@ public static class Stats
"mem",
"max mem",
"mem %",
"peak mem",
"pids",
"net in",
"net out"
Expand All @@ -202,7 +200,6 @@ public static class Stats
private double memoryUsagePerc;
private DataSize memoryUsage;
private DataSize memoryLimit;
private DataSize memoryMaxUsage;
private long pids;
public DataSize networkReceived;
public DataSize networkSent;
Expand All @@ -224,7 +221,6 @@ public String[] toRow(String name)
memoryLimit.toString(),
memoryUsage.toString(),
format("%.2f%%", memoryUsagePerc),
memoryMaxUsage.toString(),
format("%d", pids),
format("%s", networkReceived),
format("%s", networkSent)
Expand Down

0 comments on commit ab9962c

Please sign in to comment.