Skip to content

Commit cef3720

Browse files
committed
Add getextrema benchmark
1 parent 1cf685c commit cef3720

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Tests/benchmarks.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,15 @@ def test_offset(bench: BenchmarkFixture, mode: str, size: tuple[int, int]) -> No
431431
bench(ImageChops.offset, im, 123, 45)
432432

433433

434+
@pytest.mark.benchmark(group="extrema")
435+
@pytest.mark.parametrize("mode", MODES)
436+
@pytest.mark.parametrize("size", SIZES, ids=_format_size)
437+
def test_getextrema(bench: BenchmarkFixture, mode: str, size: tuple[int, int]) -> None:
438+
im = make_pillow_image(mode, size)
439+
bench.extra_info["label"] = [f"extrema {mode}"]
440+
bench(im.getextrema)
441+
442+
434443
@pytest.mark.benchmark(group="histogram")
435444
@pytest.mark.parametrize("mode", MODES)
436445
@pytest.mark.parametrize("size", SIZES, ids=_format_size)

0 commit comments

Comments
 (0)