Skip to content

Keep ASV benchmark regressions visible in bot comments - #1872

Draft
kelpforge wants to merge 4 commits into
UXARRAY:mainfrom
kelpforge:fix/asv-regressions-visible
Draft

kelpforge wants to merge 4 commits into
UXARRAY:mainfrom
kelpforge:fix/asv-regressions-visible

Conversation

@kelpforge

Copy link
Copy Markdown

Closes #1739

Overview

Keep ASV regressions visible at the top of the benchmark bot comment, followed by improvements. Only unchanged benchmarks go in a collapsed details section. Non-comparable and unfamiliar output stays visible; the table content is retained rather than interpreted or recalculated.

The change stays inside the existing trusted inline github-script. It does not check out or execute PR/fork code in the write-token workflow, and it does not change benchmark thresholds, execution or artifact handling.

Tests

  • Seven offline workflow tests and nine subtests pass using the actual inline JavaScript with mocked artifact reads and GitHub calls. Covers mixed and missing categories, CRLF, unfamiliar output, repeated sections, and create/update routing.
  • The same-target baseline fails the regression-order and visible-results checks. No setup exceptions were counted as regression evidence.
  • Actual ASV Compare.print_table output, including a 14x slowdown and introduced failure, was passed through the renderer. This is synthetic comparison data, not a UXarray performance claim.
  • YAML parsing, explicit ruff on the new test, all applicable pre-commit hooks and git diff --check pass.
  • Rendered preview inspected: slowdown/failure tables first, improvements visible, unchanged benchmarks collapsed.

Run the offline tests with Node.js available:

python -m unittest discover -s test/ci -v

The full UXarray scientific test suite and live GitHub Actions execution were not run locally. No UXarray runtime code changes.

AI Disclosure

AI assistance generated, inspected and tested this patch and its tests. This is not a claim that Anish personally wrote or reviewed the changes. The personal-responsibility checkbox is left unchecked rather than making an attestation on his behalf.

  • I have tested and take responsibility for all AI-generated content in my PR.

AI-generated and tested contribution. Exercises the actual inline workflow script with mocked artifact and GitHub calls, without executing fork code.
AI-generated and tested. Reorder existing split tables without hiding regressions, improvements or unfamiliar output. Only unchanged benchmarks are collapsed. No new privileged checkout or execution of fork code.
@erogluorhan erogluorhan added the run-benchmark Run ASV benchmark workflow label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

ASV Benchmarking

Benchmark Comparison Results

Benchmarks that have improved:

Change Before [70e73b9] After [3cfbf46] Ratio Benchmark (Parameter)
- 755k 669k 0.89 mpas_ocean.NeighborhoodDask.track_peakmem_mean('480km', 'grid_chunks')

Benchmarks that have stayed the same:

Change Before [70e73b9] After [3cfbf46] Ratio Benchmark (Parameter)
980±10μs 977±10μs 1.00 connectivity.Connectivity.time_edge_face('120km')
418±10μs 424±10μs 1.01 connectivity.Connectivity.time_edge_face('480km')
3.47±0.03ms 3.47±0.2ms 1.00 connectivity.Connectivity.time_edge_node('120km')
1.05±0.03ms 1.07±0.03ms 1.01 connectivity.Connectivity.time_edge_node('480km')
54.1±3μs 51.0±2μs 0.94 connectivity.Connectivity.time_face_edge('120km')
51.7±7μs 50.2±2μs 0.97 connectivity.Connectivity.time_face_edge('480km')
746±20μs 750±10μs 1.01 connectivity.Connectivity.time_face_face('120km')
336±10μs 339±20μs 1.01 connectivity.Connectivity.time_face_face('480km')
60.7±7μs 55.7±4μs 0.92 connectivity.Connectivity.time_face_node('120km')
53.7±10μs 52.1±8μs 0.97 connectivity.Connectivity.time_face_node('480km')
460±20μs 445±7μs 0.97 connectivity.Connectivity.time_n_nodes_per_face('120km')
348±10μs 345±20μs 0.99 connectivity.Connectivity.time_n_nodes_per_face('480km')
1.38±0.03ms 1.35±0.02ms 0.98 connectivity.Connectivity.time_node_edge('120km')
440±10μs 432±8μs 0.98 connectivity.Connectivity.time_node_edge('480km')
94.8±3ms 85.8±0.4ms ~0.91 connectivity.Connectivity.time_node_face('120km')
5.35±0.03ms 5.37±0.07ms 1.00 connectivity.Connectivity.time_node_face('480km')
1.42M 1.42M 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_edge_face('120km')
105k 105k 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_edge_face('480km')
6.48M 6.48M 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_edge_node('120km')
419k 419k 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_edge_node('480km')
2.05k 2.05k 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_face_edge('120km')
2.05k 2.05k 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_face_edge('480km')
1.6M 1.6M 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_face_face('120km')
101k 101k 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_face_face('480km')
2.18k 2.18k 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_face_node('120km')
2.18k 2.18k 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_face_node('480km')
240k 240k 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_n_nodes_per_face('120km')
26k 26k 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_n_nodes_per_face('480km')
1.9M 1.9M 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_node_edge('120km')
127k 127k 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_node_edge('480km')
11.9M 11.9M 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_node_face('120km')
747k 747k 1.00 connectivity.ConnectivityTracemalloc.track_peakmem_node_face('480km')
7.37±1ms 7.00±0.2ms 0.95 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
2.40±0.03ms 2.37±0.04ms 0.99 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
7.95±0.1ms 8.14±8ms 1.02 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
1.46±0.03ms 1.50±0.03ms 1.03 face_bounds.FaceBounds.time_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
57.3k 57.3k 1.00 face_bounds.FaceBounds.track_nbytes_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
12.3k 12.3k 1.00 face_bounds.FaceBounds.track_nbytes_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
123k 123k 1.00 face_bounds.FaceBounds.track_nbytes_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
128 128 1.00 face_bounds.FaceBounds.track_nbytes_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
1.27M 1.27M 1.00 face_bounds.FaceBounds.track_nbytes_grid_with_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
50.1k 50.1k 1.00 face_bounds.FaceBounds.track_nbytes_grid_with_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
516k 516k 1.00 face_bounds.FaceBounds.track_nbytes_grid_with_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
712 712 1.00 face_bounds.FaceBounds.track_nbytes_grid_with_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
1.72M 1.72M 1.00 face_bounds.FaceBounds.track_peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
1.7M 1.7M 1.00 face_bounds.FaceBounds.track_peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
1.86M 1.86M 1.00 face_bounds.FaceBounds.track_peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
35.3k 35.3k 1.00 face_bounds.FaceBounds.track_peakmem_face_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
851±20ns 862±20ns 1.01 geometry_kernels.AccucrossKernels.time_accucross
1.95±0.02μs 1.95±0.04μs 1.00 geometry_kernels.AccucrossKernels.time_accucross_pair
501±20ns 470±10ns 0.94 geometry_kernels.EFTPrimitives.time_acc_sqrt_re
490±10ns 456±30ns 0.93 geometry_kernels.EFTPrimitives.time_diff_of_products
435±40ns 405±30ns 0.93 geometry_kernels.EFTPrimitives.time_two_prod
450±30ns 455±30ns 1.01 geometry_kernels.EFTPrimitives.time_two_sum
706±30ns 681±30ns 0.96 geometry_kernels.GCAConstLatIntersection.time_accux_constlat_kernel
766±20ns 766±30ns 1.00 geometry_kernels.GCAConstLatIntersection.time_gca_const_lat_intersection
861±10ns 812±20ns 0.94 geometry_kernels.GCAConstLatIntersection.time_try_gca_const_lat_intersection
726±20ns 721±20ns 0.99 geometry_kernels.GCAGCAIntersection.time_accux_gca_kernel
821±40ns 831±10ns 1.01 geometry_kernels.GCAGCAIntersection.time_gca_gca_intersection
981±8ns 951±40ns 0.97 geometry_kernels.GCAGCAIntersection.time_try_gca_gca_intersection
48.7±0.4μs 52.5±1μs 1.08 geometry_kernels.OrientPredicates.time_on_minor_arc
49.9±0.7μs 52.9±0.9μs 1.06 geometry_kernels.OrientPredicates.time_orient3d_on_sphere
3.26±0.01ms 3.26±0ms 1.00 geometry_samebody.SameBodyConstLat.time_accux_dispatch
1.32±0.01ms 1.33±0.01ms 1.01 geometry_samebody.SameBodyConstLat.time_accux_kernel
2.26±0ms 2.26±0ms 1.00 geometry_samebody.SameBodyConstLat.time_fp64_dispatch
152±0.06μs 151±0.4μs 0.99 geometry_samebody.SameBodyConstLat.time_fp64_kernel
25.4±0.03ms 25.8±0.06ms 1.02 geometry_samebody_gcagca.SameBodyGcaGca.time_accux_dispatch
5.54±0.01ms 5.59±0.02ms 1.01 geometry_samebody_gcagca.SameBodyGcaGca.time_accux_kernel
19.9±0.02ms 20.3±0.03ms 1.02 geometry_samebody_gcagca.SameBodyGcaGca.time_fp64_dispatch
697±4μs 716±5μs 1.03 geometry_samebody_gcagca.SameBodyGcaGca.time_fp64_kernel
986±20ms 978±20ms 0.99 import.Imports.timeraw_import_uxarray
1 1 1.00 lazy_grid_construction.LazyGridConstruction.track_computes_isel
3 3 1.00 lazy_grid_construction.LazyGridConstruction.track_computes_open_grid_chunked
103±1ms 101±0.4ms 0.98 lazy_grid_construction.OpenGridChunked.time_open_grid('120km')
127±2ms 127±2ms 1.00 lazy_grid_construction.OpenGridChunked.time_open_grid('480km')
3.43M 3.42M 1.00 lazy_grid_construction.OpenGridChunked.track_peakmem_open_grid('120km')
2.41M 2.22M 0.92 lazy_grid_construction.OpenGridChunked.track_peakmem_open_grid('480km')
2.25±0.01ms 2.26±0.03ms 1.01 mpas_ocean.AzimuthalAverage.time_azimuthal_average('120km')
1.02±0.01ms 1.00±0.01ms 0.99 mpas_ocean.AzimuthalAverage.time_azimuthal_average('480km')
2.60±0.04ms 2.44±0.03ms 0.94 mpas_ocean.CheckNorm.time_check_norm('120km')
1.97±0.07ms 1.91±0.02ms 0.97 mpas_ocean.CheckNorm.time_check_norm('480km')
1.15±0.02ms 1.13±0.01ms 0.98 mpas_ocean.ConnectivityConstruction.time_face_face_connectivity('120km')
527±10μs 538±10μs 1.02 mpas_ocean.ConnectivityConstruction.time_face_face_connectivity('480km')
646±7μs 627±9μs 0.97 mpas_ocean.ConnectivityConstruction.time_n_nodes_per_face('120km')
570±9μs 594±20μs 1.04 mpas_ocean.ConnectivityConstruction.time_n_nodes_per_face('480km')
5.32±0.05ms 5.39±0.1ms 1.01 mpas_ocean.ConstructFaceLatLon.time_cartesian_averaging('120km')
3.67±0.03ms 3.59±0.01ms 0.98 mpas_ocean.ConstructFaceLatLon.time_cartesian_averaging('480km')
102±0.6ms 104±2ms 1.02 mpas_ocean.ConstructFaceLatLon.time_welzl('120km')
9.55±0.2ms 9.80±0.2ms 1.03 mpas_ocean.ConstructFaceLatLon.time_welzl('480km')
15.5±0.03ms 15.6±0.09ms 1.00 mpas_ocean.ConstructTreeStructures.time_ball_tree('120km')
789±30μs 787±30μs 1.00 mpas_ocean.ConstructTreeStructures.time_ball_tree('480km')
7.95±0.07ms 7.87±0.03ms 0.99 mpas_ocean.ConstructTreeStructures.time_kd_tree('120km')
565±50μs 467±30μs ~0.83 mpas_ocean.ConstructTreeStructures.time_kd_tree('480km')
541±7ms 544±1ms 1.00 mpas_ocean.CrossSections.time_const_lat('120km', 1)
275±4ms 265±0.7ms 0.96 mpas_ocean.CrossSections.time_const_lat('120km', 2)
139±0.4ms 138±3ms 0.99 mpas_ocean.CrossSections.time_const_lat('120km', 4)
492±6ms 477±4ms 0.97 mpas_ocean.CrossSections.time_const_lat('480km', 1)
242±2ms 236±0.4ms 0.98 mpas_ocean.CrossSections.time_const_lat('480km', 2)
130±3ms 121±1ms 0.93 mpas_ocean.CrossSections.time_const_lat('480km', 4)
26.0±0.07ms 26.2±0.07ms 1.01 mpas_ocean.DualMesh.time_dual_mesh_construction('120km')
3.28±0.1ms 3.30±0.04ms 1.01 mpas_ocean.DualMesh.time_dual_mesh_construction('480km')
9.20±0.2ms 8.58±0.2ms 0.93 mpas_ocean.FaceAreas.time_face_areas('120km')
2.65±0.08ms 2.57±0.1ms 0.97 mpas_ocean.FaceAreas.time_face_areas('480km')
229k 229k 1.00 mpas_ocean.FaceAreas.track_nbytes_face_areas('120km')
14.3k 14.3k 1.00 mpas_ocean.FaceAreas.track_nbytes_face_areas('480km')
2.12M 2.12M 1.00 mpas_ocean.FaceAreas.track_peakmem_face_areas('120km')
687k 687k 1.00 mpas_ocean.FaceAreas.track_peakmem_face_areas('480km')
53.8±0.8ms 53.0±1ms 0.99 mpas_ocean.GeoDataFrame.time_to_geodataframe('120km', 'exclude')
156±2ms 160±2ms 1.02 mpas_ocean.GeoDataFrame.time_to_geodataframe('120km', 'split')
5.67±0.2ms 5.44±0.5ms 0.96 mpas_ocean.GeoDataFrame.time_to_geodataframe('480km', 'exclude')
30.9±0.4ms 30.3±0.2ms 0.98 mpas_ocean.GeoDataFrame.time_to_geodataframe('480km', 'split')
13.3±0.2ms 13.1±0.03ms 0.99 mpas_ocean.Gradient.time_gradient('120km')
2.31±0.01ms 2.32±0.01ms 1.00 mpas_ocean.Gradient.time_gradient('480km')
457k 457k 1.00 mpas_ocean.Gradient.track_nbytes_gradient('120km')
28.7k 28.7k 1.00 mpas_ocean.Gradient.track_nbytes_gradient('480km')
3.44M 3.44M 1.00 mpas_ocean.Gradient.track_peakmem_gradient('120km')
226k 226k 1.00 mpas_ocean.Gradient.track_peakmem_gradient('480km')
294±8μs 267±10μs ~0.91 mpas_ocean.HoleEdgeIndices.time_construct_hole_edge_indices('120km')
112±6μs 105±1μs 0.94 mpas_ocean.HoleEdgeIndices.time_construct_hole_edge_indices('480km')
172±9μs 173±10μs 1.01 mpas_ocean.Integrate.time_integrate('120km')
146±4μs 148±5μs 1.01 mpas_ocean.Integrate.time_integrate('480km')
18.4M 18.4M 1.00 mpas_ocean.Integrate.track_nbytes_integrate('120km')
1.2M 1.2M 1.00 mpas_ocean.Integrate.track_nbytes_integrate('480km')
140±2ms 136±2ms 0.98 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('120km', 'exclude')
141±3ms 136±0.7ms 0.96 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('120km', 'include')
140±2ms 137±1ms 0.97 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('120km', 'split')
9.78±0.02ms 9.60±0.03ms 0.98 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('480km', 'exclude')
9.77±0.01ms 9.69±0.1ms 0.99 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('480km', 'include')
10.0±0.1ms 9.59±0.01ms 0.96 mpas_ocean.MatplotlibConversion.time_dataarray_to_polycollection('480km', 'split')
241±1ms 236±2ms 0.98 mpas_ocean.NeighborhoodBuild.time_build('120km', 1.0)
493±4ms 488±2ms 0.99 mpas_ocean.NeighborhoodBuild.time_build('120km', 5.0)
13.0±0.06ms 12.8±0.2ms 0.99 mpas_ocean.NeighborhoodBuild.time_build('480km', 1.0)
16.1±0.1ms 15.9±0.07ms 0.98 mpas_ocean.NeighborhoodBuild.time_build('480km', 5.0)
235±1ms 233±2ms 0.99 mpas_ocean.NeighborhoodBuild.time_query_radius('120km', 1.0)
489±4ms 483±3ms 0.99 mpas_ocean.NeighborhoodBuild.time_query_radius('120km', 5.0)
12.8±0.2ms 12.5±0.04ms 0.98 mpas_ocean.NeighborhoodBuild.time_query_radius('480km', 1.0)
16.0±0.08ms 15.8±0.1ms 0.99 mpas_ocean.NeighborhoodBuild.time_query_radius('480km', 5.0)
612.76 612.76 1.00 mpas_ocean.NeighborhoodBuild.track_mean_neighbors('120km', 15.0)
74.17 74.17 1.00 mpas_ocean.NeighborhoodBuild.track_mean_neighbors('120km', 5.0)
37.29 37.29 1.00 mpas_ocean.NeighborhoodBuild.track_mean_neighbors('480km', 15.0)
6.57 6.57 1.00 mpas_ocean.NeighborhoodBuild.track_mean_neighbors('480km', 5.0)
141M 141M 1.00 mpas_ocean.NeighborhoodBuild.track_nbytes_neighbors('120km', 15.0)
17.4M 17.4M 1.00 mpas_ocean.NeighborhoodBuild.track_nbytes_neighbors('120km', 5.0)
563k 563k 1.00 mpas_ocean.NeighborhoodBuild.track_nbytes_neighbors('480km', 15.0)
123k 123k 1.00 mpas_ocean.NeighborhoodBuild.track_nbytes_neighbors('480km', 5.0)
145M 145M 1.00 mpas_ocean.NeighborhoodBuild.track_peakmem_build('120km', 15.0)
21.5M 21.5M 1.00 mpas_ocean.NeighborhoodBuild.track_peakmem_build('120km', 5.0)
824k 824k 1.00 mpas_ocean.NeighborhoodBuild.track_peakmem_build('480km', 15.0)
384k 384k 1.00 mpas_ocean.NeighborhoodBuild.track_peakmem_build('480km', 5.0)
39.2±0.6ms 38.8±0.7ms 0.99 mpas_ocean.NeighborhoodDask.time_mean('120km', 'grid_chunks')
17.9±0.05ms 17.9±0.2ms 1.00 mpas_ocean.NeighborhoodDask.time_mean('120km', 'numpy')
34.9±0.8ms 36.3±1ms 1.04 mpas_ocean.NeighborhoodDask.time_mean('120km', 'time_chunks')
10.2±0.08ms 10.2±0.07ms 1.00 mpas_ocean.NeighborhoodDask.time_mean('480km', 'grid_chunks')
765±200μs 623±7μs ~0.81 mpas_ocean.NeighborhoodDask.time_mean('480km', 'numpy')
7.01±0.03ms 7.04±0.03ms 1.01 mpas_ocean.NeighborhoodDask.time_mean('480km', 'time_chunks')
5.82M 5.82M 1.00 mpas_ocean.NeighborhoodDask.track_peakmem_mean('120km', 'grid_chunks')
2.75M 2.75M 1.00 mpas_ocean.NeighborhoodDask.track_peakmem_mean('120km', 'numpy')
5.68M 5.68M 1.00 mpas_ocean.NeighborhoodDask.track_peakmem_mean('120km', 'time_chunks')
177k 177k 1.00 mpas_ocean.NeighborhoodDask.track_peakmem_mean('480km', 'numpy')
528k 529k 1.00 mpas_ocean.NeighborhoodDask.track_peakmem_mean('480km', 'time_chunks')
4.39±0.02s 4.38±0.02s 1.00 mpas_ocean.NeighborhoodReduce.time_dataset_reduce('120km', 'mean')
4.58±0.06s 4.49±0.01s 0.98 mpas_ocean.NeighborhoodReduce.time_dataset_reduce('120km', 'median')
117±0.3ms 118±0.3ms 1.01 mpas_ocean.NeighborhoodReduce.time_dataset_reduce('480km', 'mean')
119±2ms 117±0.8ms 0.98 mpas_ocean.NeighborhoodReduce.time_dataset_reduce('480km', 'median')
497±3ms 491±3ms 0.99 mpas_ocean.NeighborhoodReduce.time_neighborhood_reduce('120km', 'mean')
532±4ms 527±3ms 0.99 mpas_ocean.NeighborhoodReduce.time_neighborhood_reduce('120km', 'median')
16.2±0.1ms 16.2±0.03ms 1.00 mpas_ocean.NeighborhoodReduce.time_neighborhood_reduce('480km', 'mean')
16.7±0.3ms 16.7±0.07ms 1.00 mpas_ocean.NeighborhoodReduce.time_neighborhood_reduce('480km', 'median')
4.52±0.04ms 4.53±0.06ms 1.00 mpas_ocean.NeighborhoodReduce.time_reduce('120km', 'mean')
37.7±0.07ms 37.0±0.03ms 0.98 mpas_ocean.NeighborhoodReduce.time_reduce('120km', 'median')
212±20μs 192±3μs ~0.91 mpas_ocean.NeighborhoodReduce.time_reduce('480km', 'mean')
463±6μs 471±10μs 1.02 mpas_ocean.NeighborhoodReduce.time_reduce('480km', 'median')
234k 234k 1.00 mpas_ocean.NeighborhoodReduce.track_peakmem_reduce('120km', 'mean')
235k 235k 1.00 mpas_ocean.NeighborhoodReduce.track_peakmem_reduce('120km', 'median')
19.5k 19.5k 1.00 mpas_ocean.NeighborhoodReduce.track_peakmem_reduce('480km', 'mean')
19.6k 19.6k 1.00 mpas_ocean.NeighborhoodReduce.track_peakmem_reduce('480km', 'median')
404±20μs 404±10μs 1.00 mpas_ocean.PointInPolygon.time_face_search_lonlat('120km')
368±30μs 364±20μs 0.99 mpas_ocean.PointInPolygon.time_face_search_lonlat('480km')
401±20μs 400±7μs 1.00 mpas_ocean.PointInPolygon.time_face_search_xyz('120km')
363±30μs 325±20μs ~0.90 mpas_ocean.PointInPolygon.time_face_search_xyz('480km')
103±1ms 103±0.4ms 1.00 mpas_ocean.RemapDownsample.time_bilinear_remapping
17.0±0.1ms 16.9±0.2ms 0.99 mpas_ocean.RemapDownsample.time_inverse_distance_weighted_remapping
15.4±0.2ms 15.1±0.2ms 0.98 mpas_ocean.RemapDownsample.time_nearest_neighbor_remapping
904±5ms 910±7ms 1.01 mpas_ocean.RemapUpsample.time_bilinear_remapping
24.5±0.2ms 24.2±0.06ms 0.99 mpas_ocean.RemapUpsample.time_inverse_distance_weighted_remapping
9.81±0.09ms 9.75±0.06ms 0.99 mpas_ocean.RemapUpsample.time_nearest_neighbor_remapping
7.95±0.1ms 8.25±0.1ms 1.04 mpas_ocean.ZonalAverage.time_zonal_average('120km')
4.82±0.1ms 4.77±0.04ms 0.99 mpas_ocean.ZonalAverage.time_zonal_average('480km')
1.0399512805814222 1.0299203941512505 0.99 nogil_scaling.GILScaling.track_gil_scaling
1.31±0.02ms 1.31±0.01ms 1.00 open_dataset.OpenDataset.time_open_dataset('dataset', 'dataset')
2.29±0.01ms 2.30±0.01ms 1.00 open_dataset.OpenDataset.time_open_dataset('dataset', 'file')
5.34±0.1ms 5.26±0.1ms 0.99 open_dataset.OpenDataset.time_open_dataset('file', 'dataset')
6.38±0.09ms 6.19±0.04ms 0.97 open_dataset.OpenDataset.time_open_dataset('file', 'file')
178±8μs 176±1μs 0.99 open_dataset.OpenDataset.time_open_dataset('grid', 'dataset')
1.13±0ms 1.14±0.02ms 1.01 open_dataset.OpenDataset.time_open_dataset('grid', 'file')
2.04±0.02s 2.00±0.04s 0.98 plots.PlotContour.time_contour_projected
231±1ms 229±2ms 0.99 plots.PlotHealpix.time_default_plot(6)
2.10±0.03s 2.07±0.01s 0.99 plots.PlotHealpix.time_default_plot(8)
28M 28M 1.00 plots.PlotHealpix.track_peakmem_default_plot(6)
443M 443M 1.00 plots.PlotHealpix.track_peakmem_default_plot(8)
8.44±0.2ms 8.31±0.1ms 0.98 quad_hexagon.QuadHexagon.time_open_dataset
7.24±0.04ms 7.17±0.02ms 0.99 quad_hexagon.QuadHexagon.time_open_grid
408 408 1.00 quad_hexagon.QuadHexagon.track_nbytes_open_dataset
392 392 1.00 quad_hexagon.QuadHexagon.track_nbytes_open_grid
71.7k 71.8k 1.00 quad_hexagon.QuadHexagon.track_peakmem_open_dataset
71.5k 71.5k 1.00 quad_hexagon.QuadHexagon.track_peakmem_open_grid
8.68±0.2ms 8.55±0.2ms 0.99 subset.BoundingBox.time_bounding_box('120km')
5.09±0.1ms 5.13±0.03ms 1.01 subset.BoundingBox.time_bounding_box('480km')
2.38M 2.38M 1.00 subset.BoundingBox.track_peakmem_bounding_box('120km')
203k 203k 1.00 subset.BoundingBox.track_peakmem_bounding_box('480km')
3.94±0.07ms 4.11±9ms 1.04 subset.BoundingBoxHealpix.time_bounding_box(6)
15.0±1ms 14.6±2ms 0.97 subset.BoundingBoxHealpix.time_bounding_box(8)
2.14M 2.14M 1.00 subset.BoundingBoxHealpix.track_peakmem_bounding_box(6)
13.2M 13.2M 1.00 subset.BoundingBoxHealpix.track_peakmem_bounding_box(8)
735±2ms 730±6ms 0.99 to_raster.ToRaster.time_to_raster((10000.0, 10.0))
1.54±0.01s 1.52±0.01s 0.99 to_raster.ToRaster.time_to_raster((10000.0, 100.0))
1.80±0.01s 1.79±0.01s 0.99 to_raster.ToRaster.time_to_raster((100000.0, 100.0))
270M 270M 1.00 to_raster.ToRaster.track_peakmem((10000.0, 10.0))
680M 680M 1.00 to_raster.ToRaster.track_peakmem((10000.0, 100.0))
765M 765M 1.00 to_raster.ToRaster.track_peakmem((100000.0, 100.0))
97.6±9μs 93.3±3μs 0.96 to_xarray.UxDataArrayToXarray.time_to_xarray(10)
246±10μs 242±5μs 0.98 to_xarray.UxDatasetToXarray.time_to_xarray((100, 10))
2.12±0.02ms 2.21±0.04ms 1.04 to_xarray.UxDatasetToXarray.time_to_xarray((1000, 100))
517±7μs 517±5μs 1.00 to_xarray.UxDatasetToXarray.time_to_xarray_healpix((100, 10))
4.91±0.2ms 4.86±0.05ms 0.99 to_xarray.UxDatasetToXarray.time_to_xarray_healpix((1000, 100))

Benchmarks that have got worse:

Change Before [70e73b9] After [3cfbf46] Ratio Benchmark (Parameter)
+ 305M 390M 1.28 face_bounds.FaceBoundsColdStartRss.track_peakmem_open_and_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/mpas/QU/oQU480.231010.nc'))
+ 306M 390M 1.28 face_bounds.FaceBoundsColdStartRss.track_peakmem_open_and_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/scrip/outCSne8/outCSne8.nc'))
+ 308M 390M 1.27 face_bounds.FaceBoundsColdStartRss.track_peakmem_open_and_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/geoflow-small/grid.nc'))
+ 305M 390M 1.28 face_bounds.FaceBoundsColdStartRss.track_peakmem_open_and_bounds(PosixPath('/home/runner/work/uxarray/uxarray/test/meshfiles/ugrid/quad-hexagon/grid.nc'))
+ 280M 389M 1.39 import.Imports.track_peakmem_import_uxarray
+ 326M 390M 1.2 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('120km', 1)
+ 327M 390M 1.19 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('120km', 2)
+ 326M 390M 1.2 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('120km', 4)
+ 308M 390M 1.26 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('480km', 1)
+ 309M 390M 1.26 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('480km', 2)
+ 308M 390M 1.27 mpas_ocean.CrossSectionsPeakMem.track_peakmem_const_lat('480km', 4)
+ 324M 390M 1.21 mpas_ocean.GradientColdStartRss.track_peakmem_gradient('120km')
+ 301M 390M 1.3 mpas_ocean.GradientColdStartRss.track_peakmem_gradient('480km')
+ 328M 390M 1.19 mpas_ocean.ZonalAveragePeakMem.track_peakmem_zonal_average('120km')
+ 309M 390M 1.27 mpas_ocean.ZonalAveragePeakMem.track_peakmem_zonal_average('480km')

@erogluorhan

Copy link
Copy Markdown
Member

Hi @anishpentyala thanks very much for your contribution!

FYI: I've added the "run-benchmark" label to this to trigger the ASV benchmark runs and see how their results show up. See it above in the "ASV Benchmarking" cell. Luckily, we have some of those benchmarks that got worse, but they are still shown in the bottom-most part of that cell.

@kelpforge

Copy link
Copy Markdown
Author

@erogluorhan Thanks for checking the live output. That comment still uses the existing renderer: the comment workflow run ran from commit 79b7aa6, whose .github/workflows/asv-benchmarking-comment.yml inserts raw compareResults inside one <details> block. The category-reordering code in this draft is at f31c988, so that run did not exercise the proposed renderer.

The workflow's workflow_run trigger intentionally uses the default-branch workflow, not the fork's modified script. That write-token boundary should stay intact; running fork code in that job is not the way to test this.

The draft's offline tests exercise its actual inline JavaScript with mocked artifact reads and GitHub calls, including real ASV-formatted synthetic comparison output. Those checks support the proposed ordering, but they are not live validation of the patch against this benchmark run. The PR remains draft, and the personal-responsibility checkbox remains unchecked.

AI disclosure: this source check and reply were prepared by the AI assistant operating for @anishpentyala. No personal human review or readiness attestation is claimed.

@Sevans711

Sevans711 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Hi @anishpentyala, thank you for working on this! I'm excited to see progress on this issue, and I would be happy to take a closer look once this gets marked as ready for review.

I suspect that before this can be approved, reviewers would want to see a properly-formatted message on an actual PR somewhere. I understand your comment above describing why that is tricky to do here, though! I have a suggestion though it might be a bit complicated to get working: could you set up a PR in your personal fork which shows the benchmarking comment with correct formatting? This would likely involve making a new "workflow comment test branch", which mostly matches the branch here aside from some small additional changes to the read/write permissions, and a PR inside your own fork for merging that branch into a different branch on your fork (probably the asv-regressions-visible branch, to show that the changes are minimal in comparison). You would probably also need to define the "run-benchmark" label in your fork, and label that PR with it, so that the bot can run the benchmarks and leave a comment. Does that make sense? If you have any questions or get stuck, please don't hesitate to reach out, I would be happy to help!

Also, though I haven't taken a very close look yet and I could be wrong, I have an initial suspicion that people might not want any "test/ci/…" tests which test the CI itself, directly inside the pytest test suite. The rest of the pytest test suite is just for testing that uxarray runs correctly, so reviewers might end up requesting to remove your test_asv_comment.py file (or, to at least put it somewhere else which can be run manually on an opt-in basis when debugging the CI, but which isn't part of the pytest test suite by default). The CI itself is usually only "tested" by-eye / by running it live (or in a fork, as described above) to see if it works! Another example of this is #1629, where the changes themselves weren't huge, but demonstrating that they fully fixed the underlying issue involved finding a way to show, on my own personal fork, that the bot behaved appropriately.

@cmdupuis3

Copy link
Copy Markdown
Collaborator

@Sevans711 I was thinking about this too, but the difficulty is that it would require being able to run github actions on forks. Currently I can't on mine; that could be an organization policy change, but otherwise idk why. My plan was to temporarily set my default branch to this one or merge it to main, but since actions aren't working, that would have to happen in the main repo (!). So, I had claude write a script to run it locally on node.js the way actions/github-script would, and the new formatting seems to work.

We can take the test file out, since we're not really changing it often, and probably just merge the actual changes. If it breaks on main, it's nothing a revert can't fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-benchmark Run ASV benchmark workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve visibility of performance degradation in ASV benchmarking bot comment

4 participants