The test-ldap-sdk-performance Command-Line Tool
Provides a mechanism to help test the performance of the LDAP SDK.
It creates an LDAP listener that uses a canned-response request handler to return a predefined response to all requests. Itthen invokes another tool (either searchrate, modrate, authrate, or search-and-mod-rate) to issue concurrent requests against that listener as quickly as possible.
Usage
test-ldap-sdk-performance {arguments}
Arguments
-
--tool {searchrate|modrate|authrate|search-and-mod-rate} — The tool to invoke against the LDAP listener. It may be one of searchrate, modrate, authrate, or search-and-mod-rate. If this is not provided, then the searchrate tool will be invoked.
A provided value should be one of the following: 'searchrate', 'authrate', 'search-and-mod-rate', 'modrate'.
-
-t {num} / --numThreads {num} — The number of concurrent threads (each using its own connection) to use to process requests. If this is not provided, then a single thread will be used.
The specified value must not be less than 1 or greater than 2,147,483,647.
-
--entriesPerSearch {num} — The number of entries to return in response to each search request. If this is provided, the value must be between 0 and 100. If it is not provided, then a single entry will be returned.
The specified value must not be less than 0 or greater than 100.
-
--bindOnly — Indicates that the authrate tool should only issue bind requests. If this is not provided, the authrate tool will perform both search and bind operations. This argument will only be used in conjunction with the authrate tool.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
--resultCode {intValue} — The integer value for the result code to return in response to each request. If this is not provided, then a result code of 0 (success) will be returned.
The specified value must not be less than 0 or greater than 2,147,483,647.
-
--diagnosticMessage {message} — The diagnostic message to return in response to each request. If this is not provided, then no diagnostic message will be returned.
-
-Z / --useSSL — Encrypt communication with SSL. If this argument is not provided, then the communication will not be encrypted.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
-I {num} / --numIntervals {num} — The number of intervals to use when running the performance measurement tool. If this argument is provided in conjunction with the --warmUpIntervals argument, then the warm-up intervals will not be included in this count, and the total number of intervals run will be the sum of the two values. If this argument is not provided, then the tool will run until it is interrupted (e.g., by pressing Ctrl+C or by killing the underlying Java process).
The specified value must not be less than 0 or greater than 2,147,483,647.
-
-i {num} / --intervalDurationSeconds {num} — The length of time in seconds to use for each tool interval (that is, the length of time between each line of output giving statistical information for operations processed in that interval). If this is not provided, then a default interval duration of five seconds will be used.
The specified value must not be less than 1 or greater than 2,147,483,647.
-
--warmUpIntervals {num} — The number of intervals to run before starting to actually collect statistics to include in the final result. This can give the JVM and JIT a chance to identify and optimize hotspots in the code for the best and most stable performance. If this is not provided, then no warm-up intervals will be used and the tool will start collecting statistics right away.
The specified value must not be less than 0 or greater than 2,147,483,647.
-
--interactive — Launch the tool in interactive mode.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
--outputFile {path} — Write all standard output and standard error messages to the specified file instead of to the console.
The specified path must refer to a file which may or may not exist, but whose parent directory must exist.
-
--appendToOutputFile — Indicates that the tool should append to the file specified by the --outputFile argument if it already exists. If this argument is not provided and the output file already exists, it will be overwritten.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
--teeOutput — Write all standard output and standard error messages to the console as well as to the specified output file. The --outputFile argument must also be provided.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
-H / --help — Display usage information for this program.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
--help-debug — Display usage information for debug logging.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
--enable-debug-logging — Enables debug logging for the tool.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
--debug-log-level {level} — The debug log level to use for the tool. Allowed values include 'off', 'severe', 'warning', 'info', 'fine', 'finer', and 'finest'. If this is not specified, a default level of 'severe' will be used.
-
--debug-log-category {category} — The message categories to include in the debug log output. Allowed values include 'asn1', 'connect', 'exception', 'ldap', 'connectionpool', 'ldif', 'monitor', 'codingerror', and 'other'. This argument may be provided multiple times to indicate that multiple categories should be included. If this is not specified, then all categories will be included.
-
--include-debug-stack-traces — Indicates that debug log messages should include a stack trace with the code location from which each debug message originated.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
--use-multi-line-debug-messages — Indicates that debug log messages (which will be JSON objects) should be written as multi-line strings rather than single-line strings.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
--debug-log-file {path} — The path to the debug log file to be written. If this is not specified, a default path of 'test-ldap-sdk-performance.debug' will be used.
The specified path must refer to a file which may or may not exist, but whose parent directory must exist.
-
-V / --version — Display version information for this program.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
--propertiesFilePath {path} — The path to a properties file used to specify default values for arguments not supplied on the command line.
The specified path must refer to a file that exists.
-
--generatePropertiesFile {path} — Write an empty properties file that may be used to specify default values for arguments.
The specified path must refer to a file which may or may not exist, but whose parent directory must exist.
-
--noPropertiesFile — Do not obtain any argument values from a properties file.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
-
--suppressPropertiesFileComment — Suppress output listing the arguments obtained from a properties file.
This argument is not allowed to have a value. If this argument is included in a set of arguments, then it will be assumed to have a value of 'true'. If it is absent from a set of arguments, then it will be assumed to have a value of 'false'.
Dependent Argument Sets
-
If the --appendToOutputFile argument is provided, then the --outputFile argument must also be provided.
-
If the --teeOutput argument is provided, then the --outputFile argument must also be provided.
Exclusive Argument Sets
-
The following arguments cannot be used together: --propertiesFilePath, --noPropertiesFile
Examples
- Test LDAP SDK performance with the searchrate tool using ten concurrent threads. Communication will use an insecure connection, and each search will return a success result with a single matching entry. The tool will continue to run until it is interrupted.
test-ldap-sdk-performance --numThreads 10
- Test LDAP SDK performance with the modrate tool using ten concurrent threads over SSL-encrypted connections. Each modify will return an error result with a result code of 32 (noSuchObject) and a diagnostic message of 'The target entry does not exist'. The tool will run five warm-up intervals of five seconds each, and then ten 5-second intervals in which it will capture statistics. The tool will exit after those last ten intervals have completed.
test-ldap-sdk-performance --tool modrate --numThreads 10 --useSSL \
--resultCode 32 --diagnosticMessage "The base entry does not exist" \
--warmUpIntervals 5 --numIntervals 10 --intervalDurationSeconds 5