Skip to content

Commit

Permalink
Merge pull request #504 from rabbitmq/reduce-noise
Browse files Browse the repository at this point in the history
Only log ETS delete time if it's more than 25ms
  • Loading branch information
kjnilsson authored Jan 31, 2025
2 parents 130c01a + bf362e3 commit 77230dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ra_log_ets.erl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ handle_cast({exec_delete, UId, Spec},
%% TODO: delete from ra_log_open_mem_tables if {delete, tid()}
try timer:tc(fun () -> ra_mt:delete(Spec) end) of
{Time, Num} ->
?DEBUG("ra_log_ets: ra_mt:delete/1 took ~bms to delete ~w ~b entries",
?DEBUG_IF(Time > 25_000, "ra_log_ets: ra_mt:delete/1 took ~bms to delete ~w ~b entries",
[Time div 1000, Spec, Num]),
ok
catch
Expand All @@ -166,7 +166,7 @@ handle_cast({delete_mem_tables, UId},
[begin
try timer:tc(fun () -> ets_delete(Tid) end) of
{Time, true} ->
?DEBUG("ra_log_ets: ets:delete/1 took ~bms to delete ~w",
?DEBUG_IF(Time > 25_000, "ra_log_ets: ets:delete/1 took ~bms to delete ~w",
[Time div 1000, Tid]),
ok
catch
Expand Down

0 comments on commit 77230dd

Please sign in to comment.