mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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>
This commit is contained in:
parent
11f2583420
commit
7f1b6455fd
@ -74,6 +74,11 @@ plantestsuite_loadlist("samba4.ldb.multi_connect.python(ad_dc_ntvfs)",
|
||||
'tdb://$PREFIX_ABS/ad_dc_ntvfs/private/sam.ldb'
|
||||
'$LOADLIST', '$LISTOPT'])
|
||||
|
||||
plantestsuite_loadlist("samba4.ldap.vlv.python(ad_dc_ntvfs)", "ad_dc_ntvfs",
|
||||
[python,
|
||||
os.path.join(samba4srcdir, "dsdb/tests/python/vlv.py"),
|
||||
'$SERVER', '-U"$USERNAME%$PASSWORD"',
|
||||
'--workgroup=$DOMAIN', '$LOADLIST', '$LISTOPT'])
|
||||
|
||||
# this one doesn't tidy itself up fully, so leave it as last unless
|
||||
# you want a messy database.
|
||||
@ -85,3 +90,15 @@ plantestsuite_loadlist("samba4.ldap.ad_dc_medley_performance.python(ad_dc_ntvfs)
|
||||
'$SERVER', '-U"$USERNAME%$PASSWORD"',
|
||||
'--workgroup=$DOMAIN',
|
||||
'$LOADLIST', '$LISTOPT'])
|
||||
|
||||
# again with paged search module
|
||||
plantestsuite_loadlist("samba4.ldap.ad_dc_medley_performance.paged_search."+\
|
||||
"python(ad_dc_ntvfs)",
|
||||
"ad_dc_ntvfs",
|
||||
[python,
|
||||
os.path.join(samba4srcdir,
|
||||
"dsdb/tests/python/ad_dc_medley_performance.py"),
|
||||
'$SERVER', '-U"$USERNAME%$PASSWORD"',
|
||||
'--workgroup=$DOMAIN',
|
||||
'--use-paged-search',
|
||||
'$LOADLIST', '$LISTOPT'])
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user