Skip to content

Commit

Permalink
Be a little bit nicer on time benchmark.
Browse files Browse the repository at this point in the history
  • Loading branch information
xward committed Jan 22, 2024
1 parent bac067e commit 95bdb73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/phoenix_ddos_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ defmodule PhoenixDDoSTest do
start = PhoenixDDoS.Time.now()
run_ddos(conn(), assert_fail_after_request: 10_000)

diff = PhoenixDDoS.Time.diff_ms(start)
# ~ 30 ms per 10k
assert PhoenixDDoS.Time.diff_ms(start) < 100
assert diff < 150, "quick bench tool #{round(diff)}ms > 150 ms"
end

test "IpRateLimitPerRequestPath" do
Expand Down

0 comments on commit 95bdb73

Please sign in to comment.