meminfo-writer: ensure we always use the first parses memory info
It could plausibly be ignored for stupidly large thresholds
This commit is contained in:
parent
7e086970e9
commit
76afc2e72f
@ -64,6 +64,7 @@ const char *parse(const char *buf)
|
|||||||
if (used_mem_diff < 0)
|
if (used_mem_diff < 0)
|
||||||
used_mem_diff = -used_mem_diff;
|
used_mem_diff = -used_mem_diff;
|
||||||
if (used_mem_diff > used_mem_change_threshold
|
if (used_mem_diff > used_mem_change_threshold
|
||||||
|
|| prev_used_mem == 0
|
||||||
|| (used_mem > prev_used_mem && used_mem * 13 / 10 > MemTotal
|
|| (used_mem > prev_used_mem && used_mem * 13 / 10 > MemTotal
|
||||||
&& used_mem_diff > used_mem_change_threshold/2)) {
|
&& used_mem_diff > used_mem_change_threshold/2)) {
|
||||||
prev_used_mem = used_mem;
|
prev_used_mem = used_mem;
|
||||||
|
Loading…
Reference in New Issue
Block a user