From: Douglas Bagnall Date: Wed, 3 Jan 2024 12:54:29 +0000 (+1300) Subject: perftest:ndr_pack: spin in do_nothing for a while X-Git-Tag: tdb-1.4.11~1814 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93e6ea4cff2cb6bd084db27139addeea06945ea5;p=thirdparty%2Fsamba.git perftest:ndr_pack: spin in do_nothing for a while The idea was to get a less jittery idea of the underlying noise, but ut is still almost instant. This I suppose is useful in indicating that this much of the test has very little overhead. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett BUG: https://bugzilla.samba.org/show_bug.cgi?id=15574 --- diff --git a/source4/dsdb/tests/python/ndr_pack_performance.py b/source4/dsdb/tests/python/ndr_pack_performance.py index ed1216e6392..45c1816df39 100644 --- a/source4/dsdb/tests/python/ndr_pack_performance.py +++ b/source4/dsdb/tests/python/ndr_pack_performance.py @@ -132,9 +132,10 @@ class UserTests(samba.tests.TestCase): def get_blob(self, sddl): return ndr_pack(self.get_desc(sddl)) - def test_00_00_do_nothing(self): + def test_00_00_do_nothing(self, cycles=10000): # this gives us an idea of the overhead - pass + for i in range(SCALE * cycles): + pass def _test_pack(self, unpacked, cycles=10000): pack = unpacked.__ndr_pack__