Skip to content

Commit

Permalink
Add non-encoded joinpath benchmark (#1417)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Nov 17, 2024
1 parent e910178 commit ee4611c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_url_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,22 @@ def _run() -> None:
BASE_URL.joinpath("req", encoded=True)


def test_url_joinpath_encoded_long(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
for _ in range(100):
BASE_URL.joinpath(
"req/req/req/req/req/req/req/req/req/req/req/req/req/req", encoded=True
)


def test_url_joinpath(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
for _ in range(100):
BASE_URL.joinpath("req", encoded=False)


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

0 comments on commit ee4611c

Please sign in to comment.