Skip to content
Snippets Groups Projects
Commit fffe50a3 authored by Martin Lange's avatar Martin Lange
Browse files

benchmark to_units for noop conversion (same units)

parent 4aa2c412
No related branches found
No related tags found
1 merge request!212Benchmark to_units for noop conversion (same units)
Pipeline #132243 passed with stages
in 4 minutes and 57 seconds
......@@ -202,6 +202,27 @@ class TestUnitsTools(unittest.TestCase):
xdata = full(0.0, "test", info, time)
_result = self.benchmark(to_units, xdata=xdata, units="in")
@pytest.mark.benchmark(group="data-tools-slow")
def test_to_units_noop_01_2x1(self):
time = dt.datetime(2000, 1, 1)
info = fm.Info(time=time, grid=fm.UniformGrid((2, 1)), units="m")
xdata = full(0.0, "test", info, time)
_result = self.benchmark(to_units, xdata=xdata, units="m")
@pytest.mark.benchmark(group="data-tools-slow")
def test_to_units_noop_02_512x256(self):
time = dt.datetime(2000, 1, 1)
info = fm.Info(time=time, grid=fm.UniformGrid((512, 256)), units="m")
xdata = full(0.0, "test", info, time)
_result = self.benchmark(to_units, xdata=xdata, units="m")
@pytest.mark.benchmark(group="data-tools-slow")
def test_to_units_noop_03_2048x1024(self):
time = dt.datetime(2000, 1, 1)
info = fm.Info(time=time, grid=fm.UniformGrid((2048, 1024)), units="m")
xdata = full(0.0, "test", info, time)
_result = self.benchmark(to_units, xdata=xdata, units="m")
@pytest.mark.benchmark(group="data-tools")
def test_get_magnitude_01_2x1(self):
time = dt.datetime(2000, 1, 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment