Skip to content

edge_detection has no asv benchmarks #3672

Description

@brendancol

None of the five public functions in xrspatial/edge_detection.py (sobel_x, sobel_y, prewitt_x, prewitt_y, laplacian) appear anywhere in the asv suite:

$ grep -rn "sobel\|prewitt\|laplacian\|edge_detection" benchmarks/
(no matches)

The compute path delegates to convolve_2d, and benchmarks/benchmarks/convolution.py does time that, but only at 5x5 and 25x25 kernel sizes with the default boundary mode. The 3x3 case the edge detectors use never runs, and nothing calls the public wrappers, so a regression in either would not show up in benchmark results.

Fix: add benchmarks/benchmarks/edge_detection.py following the existing Convolve2d pattern (numpy/cupy/dask via get_xr_dataarray, one small and one realistic grid size, one timing method per function). Benchmark-only change, no source edits.

Found by the benchmark coverage sweep. Severity per the sweep rubric: medium. The convolution engine is covered; the public functions and the 3x3 kernel case are not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformancePR touches performance-sensitive codeseverity:mediumSweep finding: MEDIUMtestsTest coverage and parity

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions