Skip to content

Commit

Permalink
Add benchmark for truediv path joins (#1249)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Oct 13, 2024
1 parent 15fcd5b commit 9107005
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 @@ -295,3 +295,10 @@ def test_url_joinpath_encoded(benchmark: BenchmarkFixture) -> None:
def _run() -> None:
for _ in range(100):
BASE_URL.joinpath("req", encoded=True)


def test_url_joinpath_with_truediv(benchmark: BenchmarkFixture) -> None:
@benchmark
def _run() -> None:
for _ in range(100):
BASE_URL / "req/req/req"

0 comments on commit 9107005

Please sign in to comment.