From 5ec3b6aef7a4e9e9c72f690c96cb32438d051700 Mon Sep 17 00:00:00 2001 From: firest Date: Fri, 21 Jan 2022 16:25:06 +0800 Subject: [PATCH] fix(emqx_slow_subs): add default for stats_type --- apps/emqx_plugin_libs/src/emqx_slow_subs/emqx_slow_subs.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/emqx_plugin_libs/src/emqx_slow_subs/emqx_slow_subs.erl b/apps/emqx_plugin_libs/src/emqx_slow_subs/emqx_slow_subs.erl index e8d18fca7..c2bbc0e6d 100644 --- a/apps/emqx_plugin_libs/src/emqx_slow_subs/emqx_slow_subs.erl +++ b/apps/emqx_plugin_libs/src/emqx_slow_subs/emqx_slow_subs.erl @@ -46,7 +46,7 @@ -type message() :: #message{}. --import(proplists, [get_value/2]). +-import(proplists, [get_value/2, get_value/3]). -type stats_type() :: whole %% whole = internal + response | internal %% timespan from message in to deliver @@ -190,7 +190,7 @@ expire_tick(_) -> load(Cfg) -> MaxSize = get_value(top_k_num, Cfg), - StatsType = get_value(stats_type, Cfg), + StatsType = get_value(stats_type, Cfg, whole), Threshold = get_value(threshold, Cfg), _ = emqx:hook('delivery.completed', fun ?MODULE:on_delivery_completed/4,