Skip to content

Commit 58220d1

Browse files
authored
Set some memory benchmarks to on-demand to reduce noise. (#5481)
1 parent 47ec7f3 commit 58220d1

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

benchmarks/benchmarks/experimental/ugrid/regions_combine.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from iris.experimental.ugrid import PARSE_UGRID_ON_LOAD
2424
from iris.experimental.ugrid.utils import recombine_submeshes
2525

26-
from ... import TrackAddedMemoryAllocation
26+
from ... import TrackAddedMemoryAllocation, on_demand_benchmark
2727
from ...generate_data.ugrid import make_cube_like_2d_cubesphere
2828

2929

@@ -200,6 +200,8 @@ class CombineRegionsComputeRealData(MixinCombineRegions):
200200
def time_compute_data(self, n_cubesphere):
201201
_ = self.recombined_cube.data
202202

203+
# Vulnerable to noise, so disabled by default.
204+
@on_demand_benchmark
203205
@TrackAddedMemoryAllocation.decorator
204206
def track_addedmem_compute_data(self, n_cubesphere):
205207
_ = self.recombined_cube.data
@@ -217,6 +219,8 @@ def time_save(self, n_cubesphere):
217219
# Save to disk, which must compute data + stream it to file.
218220
save(self.recombined_cube, "tmp.nc")
219221

222+
# Vulnerable to noise, so disabled by default.
223+
@on_demand_benchmark
220224
@TrackAddedMemoryAllocation.decorator
221225
def track_addedmem_save(self, n_cubesphere):
222226
save(self.recombined_cube, "tmp.nc")
@@ -245,6 +249,8 @@ def time_stream_file2file(self, n_cubesphere):
245249
# Save to disk, which must compute data + stream it to file.
246250
save(self.recombined_cube, "tmp.nc")
247251

252+
# Vulnerable to noise, so disabled by default.
253+
@on_demand_benchmark
248254
@TrackAddedMemoryAllocation.decorator
249255
def track_addedmem_stream_file2file(self, n_cubesphere):
250256
save(self.recombined_cube, "tmp.nc")

benchmarks/benchmarks/save.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from iris import save
1717
from iris.experimental.ugrid import save_mesh
1818

19-
from . import TrackAddedMemoryAllocation
19+
from . import TrackAddedMemoryAllocation, on_demand_benchmark
2020
from .generate_data.ugrid import make_cube_like_2d_cubesphere
2121

2222

@@ -47,6 +47,8 @@ def time_netcdf_save_mesh(self, n_cubesphere, is_unstructured):
4747
if is_unstructured:
4848
self._save_mesh(self.cube)
4949

50+
# Vulnerable to noise, so disabled by default.
51+
@on_demand_benchmark
5052
@TrackAddedMemoryAllocation.decorator
5153
def track_addedmem_netcdf_save(self, n_cubesphere, is_unstructured):
5254
# Don't need to copy the cube here since track_ benchmarks don't

docs/src/whatsnew/latest.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ This document explains the changes made to Iris for this release
8585
working properly. (Main pull request: :pull:`5437`, more detail:
8686
:pull:`5430`, :pull:`5431`, :pull:`5432`, :pull:`5434`, :pull:`5436`)
8787

88+
#. `@trexfeathers`_ set a number of memory benchmarks to be on-demand, as they
89+
were vulnerable to false positives in CI runs. (:pull:`5481`)
90+
8891
#. `@acchamber`_ and `@ESadek-MO`_ resolved several deprecation to reduce
8992
number of warnings raised during tests.
9093
(:pull:`5493`, :pull:`5511`)
@@ -96,8 +99,6 @@ This document explains the changes made to Iris for this release
9699
longer using the ``--strict`` argument. (:pull:`5496`)
97100

98101

99-
100-
101102
.. comment
102103
Whatsnew author names (@github name) in alphabetical order. Note that,
103104
core dev names are automatically included by the common_links.inc:

0 commit comments

Comments
 (0)