Skip to content

Commit

Permalink
Add benchmark for building a URL with query (#1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Oct 16, 2024
1 parent 10ce80a commit cd1d352
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_url_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ def _run() -> None:
URL.build(host="www.domain.tld", path="/req", port=1234)


def test_url_build_with_simple_query(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
for _ in range(100):
URL.build(host="www.domain.tld", query=SIMPLE_QUERY)


def test_url_build_encoded_with_host_and_port(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
Expand Down

0 comments on commit cd1d352

Please sign in to comment.