Skip to content

Commit 77230dd

Browse files
authored
Merge pull request #504 from rabbitmq/reduce-noise
Only log ETS delete time if it's more than 25ms
2 parents 130c01a + bf362e3 commit 77230dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ra_log_ets.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ handle_cast({exec_delete, UId, Spec},
147147
%% TODO: delete from ra_log_open_mem_tables if {delete, tid()}
148148
try timer:tc(fun () -> ra_mt:delete(Spec) end) of
149149
{Time, Num} ->
150-
?DEBUG("ra_log_ets: ra_mt:delete/1 took ~bms to delete ~w ~b entries",
150+
?DEBUG_IF(Time > 25_000, "ra_log_ets: ra_mt:delete/1 took ~bms to delete ~w ~b entries",
151151
[Time div 1000, Spec, Num]),
152152
ok
153153
catch
@@ -166,7 +166,7 @@ handle_cast({delete_mem_tables, UId},
166166
[begin
167167
try timer:tc(fun () -> ets_delete(Tid) end) of
168168
{Time, true} ->
169-
?DEBUG("ra_log_ets: ets:delete/1 took ~bms to delete ~w",
169+
?DEBUG_IF(Time > 25_000, "ra_log_ets: ets:delete/1 took ~bms to delete ~w",
170170
[Time div 1000, Tid]),
171171
ok
172172
catch

0 commit comments

Comments
 (0)