chore(emqx_os_mon): no need for special handling of 0

This commit is contained in:
Zaiming (Stone) Shi 2022-05-13 21:12:08 +02:00
parent 5f3780a032
commit d48528d74f
1 changed files with 2 additions and 6 deletions

View File

@ -77,12 +77,8 @@ set_procmem_high_watermark(Float) ->
memsup:set_procmem_high_watermark(Float). memsup:set_procmem_high_watermark(Float).
current_sysmem_percent() -> current_sysmem_percent() ->
case load_ctl:get_memory_usage() of Ratio = load_ctl:get_memory_usage(),
0 -> erlang:floor(Ratio * 10000) / 100.
0;
Ratio ->
erlang:floor(Ratio * 10000) / 100
end.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% gen_server callbacks %% gen_server callbacks