PerformanceMeters

To get started with PerformanceMeters, try the tutorial.

Running PerformanceMeters

The entry point is the main method in the com.marklogic.performance.PerformanceMeters class. It takes zero or more property files as its arguments. Any specified system properties will override file-based properties, and properties found in later files may override properties specified in earlier files on the command line. It's also possibly to specify properties as VM arguments (-DNAME=value). See src/performance-meters.sh for a sample shell script.

Every test is driven by an XML configuration file. See src/tests for sample property and XML files.

Required libraries:

Note that if you aren't planning to use XCC, you may not need the library.

Optional libraries:

If you wish to test using the XDBC test-type, you need the XDBC libraries.

Available properties:

Propertydefault valuenotes
checkResultsfalse If true, test results will be checked against the expected values in the XML test configuration file. Mismatches will be recorded as errors.
elementQNamenull Element QName for com.marklogic.performance.ElementWordTestList class. Only used when testListClass is set to use ElementWordTestList.
hostlocalhost Host name for all test connections. This must be an instance of MarkLogic Server. Multiple, space-delimited hostnames are also supported: tests will automatically round-robin across all available hosts.
isRandomTestfalse If true, the TestList will be shuffled at random. In this case, randomSeed may also be set. Note that this property is ignored unless testTime is greater than 0.
inputPathnull Required: filesystem path to XML configuration file. There is no default, and this property must be supplied.
numThreads1 Number of concurrent test threads. Each thread will run all of the available tests, unless the shared property is set.
outputPathnull Filesystem path to which results will be written. If the path already exists, and is a directory, a time- and date-stamped file will be generated. Otherwise, the exact filename will be used. By default, the current working directory is used.
passwordadmin Password for all test connections.
port8003 Host port for all test connections. Depending on the value of testType, this may be an XDBC or an HTTP server.
randomSeed0 Seed for pseudo-random number generator. Only useful for random tests.
readSize32768 The buffer size, in Bytes, for network and file reads. There is rarely any reason to change this value.
recordResultsfalse If true, the results of every test query will be recorded in the results file.
reporterXMLReporter Pluggable class used to generate results files. Supplied implementations are XMLReporter and CSVReporter (suitable for Excel imports).
reportTimetrue If true, query timings will be reported in the results file. If PerformanceMeters is being used for non-performance QA, this property may be set to false.
reportPercentileDurationnull If non-null, one or more percentiles of (millisecond) test durations will be reported. These values may be comma-delimited: for example, reportPercentileDuration=95,98 will report the 95th-percentile and 98th-percentile response times. Common values are 95 and 98.
reportStandardDeviationfalse If true, the standard deviation of test durations will be reported, in milliseconds. The calculation is performed per wikipedia's article on standard deviation.
sharedfalse If true, one TestList will be shared by all threads. In this case, the TestList must implement its own synchronization.
testTime 0 If set to a positive value, then the test will be run until at least testTime seconds have passed. If the value is less than 1, then the test is not a timed test. Instead, the available tests will be run only once.
testTypeXCC Type of test to run (case-insensitive). Supported values are XCC, XDBC, HTTP, and URI.
testListClass com.marklogic.performance.XMLFileTestList Support for pluggable TestList classes, which supply test configurations. The default value uses the built-in, XML-file test list. For an example of another TestList implementation, see the com.marklogic.performance.ElementWordTestList class.
useradmin Username for all test connections.