fix(emqx_st_statistics): fix initial value error (#6224)

* fix(emqx_st_statistics): fix initial value error
This commit is contained in:
lafirest 2021-11-21 18:55:43 +08:00 committed by GitHub
parent 7de0891201
commit 4767b41eb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -56,8 +56,8 @@
}.
-record(slow_log, { topic :: emqx_types:topic()
, count :: pos_integer()
, elapsed :: pos_integer()
, count :: integer() %% 0 will be used in initial value
, elapsed :: integer()
}).
-type message() :: #message{}.
@ -233,8 +233,8 @@ update_log(#message{topic = Topic}, Elapsed) ->
Topic,
[{#slow_log.count, 1}, {#slow_log.elapsed, Elapsed}],
#slow_log{topic = Topic,
count = 1,
elapsed = Elapsed}),
count = 0,
elapsed = 0}),
ok.
-spec do_notification(state()) -> true.