diff --git a/benchmarks/benchmarks/experimental/ugrid/regions_combine.py b/benchmarks/benchmarks/experimental/ugrid/regions_combine.py index 16044c663a..5ecc90930b 100644 --- a/benchmarks/benchmarks/experimental/ugrid/regions_combine.py +++ b/benchmarks/benchmarks/experimental/ugrid/regions_combine.py @@ -23,7 +23,7 @@ from iris.experimental.ugrid import PARSE_UGRID_ON_LOAD from iris.experimental.ugrid.utils import recombine_submeshes -from ... import TrackAddedMemoryAllocation +from ... import TrackAddedMemoryAllocation, on_demand_benchmark from ...generate_data.ugrid import make_cube_like_2d_cubesphere @@ -200,6 +200,8 @@ class CombineRegionsComputeRealData(MixinCombineRegions): def time_compute_data(self, n_cubesphere): _ = self.recombined_cube.data + # Vulnerable to noise, so disabled by default. + @on_demand_benchmark @TrackAddedMemoryAllocation.decorator def track_addedmem_compute_data(self, n_cubesphere): _ = self.recombined_cube.data @@ -217,6 +219,8 @@ def time_save(self, n_cubesphere): # Save to disk, which must compute data + stream it to file. save(self.recombined_cube, "tmp.nc") + # Vulnerable to noise, so disabled by default. + @on_demand_benchmark @TrackAddedMemoryAllocation.decorator def track_addedmem_save(self, n_cubesphere): save(self.recombined_cube, "tmp.nc") @@ -245,6 +249,8 @@ def time_stream_file2file(self, n_cubesphere): # Save to disk, which must compute data + stream it to file. save(self.recombined_cube, "tmp.nc") + # Vulnerable to noise, so disabled by default. + @on_demand_benchmark @TrackAddedMemoryAllocation.decorator def track_addedmem_stream_file2file(self, n_cubesphere): save(self.recombined_cube, "tmp.nc") diff --git a/benchmarks/benchmarks/save.py b/benchmarks/benchmarks/save.py index d00c66a0ca..e9a7918dcc 100644 --- a/benchmarks/benchmarks/save.py +++ b/benchmarks/benchmarks/save.py @@ -16,7 +16,7 @@ from iris import save from iris.experimental.ugrid import save_mesh -from . import TrackAddedMemoryAllocation +from . import TrackAddedMemoryAllocation, on_demand_benchmark from .generate_data.ugrid import make_cube_like_2d_cubesphere @@ -47,6 +47,8 @@ def time_netcdf_save_mesh(self, n_cubesphere, is_unstructured): if is_unstructured: self._save_mesh(self.cube) + # Vulnerable to noise, so disabled by default. + @on_demand_benchmark @TrackAddedMemoryAllocation.decorator def track_addedmem_netcdf_save(self, n_cubesphere, is_unstructured): # Don't need to copy the cube here since track_ benchmarks don't diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst index b4396ad0d5..333cce6db9 100644 --- a/docs/src/whatsnew/latest.rst +++ b/docs/src/whatsnew/latest.rst @@ -85,6 +85,9 @@ This document explains the changes made to Iris for this release working properly. (Main pull request: :pull:`5437`, more detail: :pull:`5430`, :pull:`5431`, :pull:`5432`, :pull:`5434`, :pull:`5436`) +#. `@trexfeathers`_ set a number of memory benchmarks to be on-demand, as they + were vulnerable to false positives in CI runs. (:pull:`5481`) + #. `@acchamber`_ and `@ESadek-MO`_ resolved several deprecation to reduce number of warnings raised during tests. (:pull:`5493`, :pull:`5511`) @@ -96,8 +99,6 @@ This document explains the changes made to Iris for this release longer using the ``--strict`` argument. (:pull:`5496`) - - .. comment Whatsnew author names (@github name) in alphabetical order. Note that, core dev names are automatically included by the common_links.inc: