Skip to content

Commit

Permalink
Add query string benchmarks (#1295)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Oct 16, 2024
1 parent 976f540 commit 760c627
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/test_url_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,31 @@ def _run() -> None:
URL_WITH_NOT_DEFAULT_PORT.human_repr()
IPV6_QUERY_URL.human_repr()
REL_URL.human_repr()


def test_query_string(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
for _ in range(100):
QUERY_URL.query_string


def test_empty_query_string(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
for _ in range(100):
BASE_URL.query_string


def test_query(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
for _ in range(100):
QUERY_URL.query


def test_empty_query(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
for _ in range(100):
BASE_URL.query

0 comments on commit 760c627

Please sign in to comment.