hammer
hammer copied to clipboard
performance degradation over time with ETS backend
Describe the bug
I've been benchmarking hot paths in https://github.com/plausible/analytics and noticed that ExHammer check here becomes slower over time, from 11us in the beginning of k6 benchmark (it hits the same site every time, so :hammer_ets_buckets
has a single key throughout the benchmark) to over 100ms in the end. And in some requests (when user-agents are cached) that check_rate
call becomes the largest slice in the request flamegraph
** Provide the following details
- Elixir version (elixir -v): 1.15.7
- Erlang version (erl -v): 26.1.2
- Operating system: mac sonoma