diff options
author | Aaron Haslett <aaronhaslett@catalyst.net.nz> | 2019-03-28 15:03:17 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-03-29 17:29:31 +0000 |
commit | 7f1b6455fdc1d7767bdfd3dc81851abb682cc087 (patch) | |
tree | 425634b33bfa5e95eb3e6455af51606729cb9a6a /source4 | |
parent | 11f2583420310e0278188935f31be3131eb85fd4 (diff) | |
download | samba-7f1b6455fdc1d7767bdfd3dc81851abb682cc087.tar.gz |
paged_search: perf testing paged search
Adding medley performance run with paged search module.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13836
Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/tests/python/ad_dc_medley_performance.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/dsdb/tests/python/ad_dc_medley_performance.py b/source4/dsdb/tests/python/ad_dc_medley_performance.py index 1be8ef6ce39..e0f0e19651a 100644 --- a/source4/dsdb/tests/python/ad_dc_medley_performance.py +++ b/source4/dsdb/tests/python/ad_dc_medley_performance.py @@ -42,6 +42,9 @@ from ldb import ERR_NO_SUCH_OBJECT parser = optparse.OptionParser("ad_dc_performance.py [options] <host>") sambaopts = options.SambaOptions(parser) +sambaopts.add_option("-p", "--use-paged-search", action="store_true", + help="Use paged search module") + parser.add_option_group(sambaopts) parser.add_option_group(options.VersionOptions(parser)) @@ -54,7 +57,6 @@ credopts = options.CredentialsOptions(parser) parser.add_option_group(credopts) opts, args = parser.parse_args() - if len(args) < 1: parser.print_usage() sys.exit(1) @@ -103,8 +105,13 @@ class UserTests(samba.tests.TestCase): super(UserTests, self).setUp() self.state = GlobalState # the class itself, not an instance self.lp = lp + + kwargs = {} + if opts.use_paged_search: + kwargs["options"] = ["modules:paged_searches"] + self.ldb = SamDB(host, credentials=creds, - session_info=system_session(lp), lp=lp) + session_info=system_session(lp), lp=lp, **kwargs) self.base_dn = self.ldb.domain_dn() self.ou = "OU=pid%s,%s" % (os.getpid(), self.base_dn) self.ou_users = "OU=users,%s" % self.ou |