To get started with PerformanceMeters, try the tutorial. For the source code, see the project page on github.
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.
Note that if you aren't planning to use XCC, you may not need the library.
Property | default value | notes |
---|---|---|
checkResults | false | If true, test results will be checked against the expected values in the XML test configuration file. Mismatches will be recorded as errors. |
elementQName | null | Element QName for com.marklogic.performance.ElementWordTestList class. Only used when testListClass is set to use ElementWordTestList. |
host | localhost | 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. |
isRandomTest | false | If true, the TestList will be shuffled at random.
In this case, randomSeed may also be set.
|
inputPath | null | Required: filesystem path to XML configuration file. There is no default, and this property must be supplied. |
numThreads | 1 | Number of concurrent test threads.
Each thread will run all of the available tests,
unless the shared property is set.
|
outputPath | null | 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. |
password | admin | Password for all test connections. |
port | 8003 | Host port for all test connections.
Depending on the value of testType ,
this may be an XDBC or an HTTP server.
|
protocol | http | Protocol for test. Supported valued are
http and https .
If set to https , SSL encryption will be used.
SSL requires MarkLogic Server 4.1 or later,
and supports only the XCC, HTTP, and URI test types.
|
randomSeed | 0 | Seed for pseudo-random number generator. Only useful for random tests. |
readSize | 32768 | The buffer size, in Bytes, for network and file reads. There is rarely any reason to change this value. |
recordResults | false | If true, the results of every test query will be recorded in the results file. |
reporter | XMLReporter | Pluggable class used to generate results files. Supplied implementations are XMLReporter and CSVReporter (suitable for Excel imports). |
reportTime | true | 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. |
reportPercentileDuration | null | 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.
|
reportStandardDeviation | false | If true, the standard deviation of test durations will be reported, in milliseconds. The calculation is performed per wikipedia's article on standard deviation. |
samplerClass | null | If set, this must be the name of a subclass of the abstract
class com.marklogic.performance.sampler.Sampler .
Sampler classes run tests, so this overrides the built-in
testType values with an arbitrary user-supplied class.
For example, you could write a class that generates
application-specific web service requests,
instead of using testType=HTTP .
Refer to the com.marklogic.performance.sampler
source code for examples.
|
shared | false | 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.
|
testType | XCC | Type of test to run (case-insensitive).
Supported values are XCC, HTTP, and URI.
See also the samplerClass property,
which allows new test types to be defined.
|
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. |
user | admin | Username for all test connections. |