aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/logger_olp.hrl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2019-03-04 11:15:23 +0100
committerSiri Hansen <[email protected]>2019-03-07 14:22:52 +0100
commit09f69a9c87e24c2bdcbbc2bdf1436146b2a825e6 (patch)
treef23813ac31bd46ef31b26d4a9ee9ff696c8c8968 /lib/kernel/src/logger_olp.hrl
parentafcaab906cfcf78d5991277a82e39a775b2dc519 (diff)
downloadotp-09f69a9c87e24c2bdcbbc2bdf1436146b2a825e6.tar.gz
otp-09f69a9c87e24c2bdcbbc2bdf1436146b2a825e6.tar.bz2
otp-09f69a9c87e24c2bdcbbc2bdf1436146b2a825e6.zip
[logger] Add max memory usage to statistics in logger_olp
Diffstat (limited to 'lib/kernel/src/logger_olp.hrl')
-rw-r--r--lib/kernel/src/logger_olp.hrl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/kernel/src/logger_olp.hrl b/lib/kernel/src/logger_olp.hrl
index 9b4f5ebf27..d68b5c048d 100644
--- a/lib/kernel/src/logger_olp.hrl
+++ b/lib/kernel/src/logger_olp.hrl
@@ -114,12 +114,16 @@
flushes => 0, flushed => 0, drops => 0,
burst_drops => 0, casts => 0, calls => 0,
writes => 0, max_qlen => 0, max_time => 0,
- freq => {TIME,0,0}} end).
+ max_mem => 0, freq => {TIME,0,0}} end).
-define(update_max_qlen(QLEN, STATE),
begin #{max_qlen := QLEN0} = STATE,
STATE#{max_qlen => ?max(QLEN0,QLEN)} end).
+ -define(update_max_mem(MEM, STATE),
+ begin #{max_mem := MEM0} = STATE,
+ STATE#{max_mem => ?max(MEM0,MEM)} end).
+
-define(update_calls_or_casts(CALL_OR_CAST, INC, STATE),
case CALL_OR_CAST of
cast ->
@@ -154,6 +158,7 @@
-else. % DEFAULT!
-define(merge_with_stats(STATE), STATE).
-define(update_max_qlen(_QLEN, STATE), STATE).
+ -define(update_max_mem(_MEM, STATE), STATE).
-define(update_calls_or_casts(_CALL_OR_CAST, _INC, STATE), STATE).
-define(update_max_time(_TIME, STATE), STATE).
-define(update_other(_OTHER, _VAR, _INCVAL, STATE), STATE).