dsdb pytsts: reduce scale of subtree rename speed test
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 21 Feb 2019 03:47:55 +0000 (16:47 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 4 Mar 2019 21:41:18 +0000 (21:41 +0000)
The speed test, when it was introduced a few patches ago, was
deliberately slow so that we could see how much better the changes
were. It used 500 users, 50 groups, and 27 computers.

Before the changes, it took this long:

rename ou took 64.373s
rename group took 0.160s
rename user took 0.004s
rename computer took 0.123s

After using the sorted links, it took this long:

rename ou took 12.984s
rename group took 0.161s
rename user took 0.004s
rename computer took 0.122s

And with the final patch to stop the linear search early on success:

rename ou took 11.680s
rename group took 0.089s
rename user took 0.004s
rename computer took 0.128s

"rename ou" is the one we were aiming at. Now that we have done that,
we reduce the size of the test so as not to slow down everyone's
autobuilds.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/tests/python/subtree_rename.py

index 81cae3a7dd8a95cc12259c25859d1209c9803383..c4f6bc7a160bd88b0f4c541009de9fcf2ab25b73 100644 (file)
@@ -395,7 +395,7 @@ class SubtreeRenameTests(samba.tests.TestCase):
 
     def test_la_move_ou_tree_big(self):
         tag = 'move_ou_big'
-        USERS, GROUPS, COMPUTERS = 500, 50, 27
+        USERS, GROUPS, COMPUTERS = 50, 10, 7
 
         users = self.add_objects(USERS, 'user', '%s_u_' % tag, ou=self.ou1)
         groups = self.add_objects(GROUPS, 'group', '%s_g_' % tag, ou=self.ou1)