-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME.html
231 lines (200 loc) · 8.09 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
/*
* Copyright (c)2005-2010 Mark Logic Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* The use of the Apache License does not indicate that this project is
* affiliated with the Apache Software Foundation.
*/
-->
<head>
<title>PerformanceMeters README</title>
<style>
td
{
vertical-align: top;
}
.code
{
font-family: monospace;
}
.note
{
font-style: italic;
}
</style>
</head>
<body>
<h1>PerformanceMeters</h1>
<p>
To get started with PerformanceMeters, try the
<a href="http://developer.marklogic.com/howto/tutorials/2006-07-performancemeters.xqy">tutorial</a>.
</p>
<h2>Running PerformanceMeters</h2>
<p>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
(<code>-DNAME=value</code>).
See src/performance-meters.sh for a sample shell script.
</p>
<p>Every test is driven by an XML configuration file.
See <a href="src/tests/">src/tests</a> for sample property and XML files.
</p>
<h2>Required libraries:</h2>
<p>Note that if you aren't planning to use XCC,
you may not need the library.
</p>
<ul>
<li>MarkLogic <a href="http://developer.marklogic.com/">XCC</a></li>
</ul>
<h2>Available properties:</h2>
<table border="1">
<tr><th>Property</th><th>default value</th><th>notes</th></tr>
<tr><td class="code">checkResults</td><td class="code">false</td>
<td>If true, test results will be checked
against the expected values in the XML test configuration file.
Mismatches will be recorded as errors.
</td></tr>
<tr><td class="code">elementQName</td><td class="note">null</td>
<td>Element QName for com.marklogic.performance.ElementWordTestList class.
Only used when testListClass is set to use ElementWordTestList.</td></tr>
<tr><td class="code">host</td><td class="code">localhost</td>
<td>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.
</td></tr>
<tr><td class="code">isRandomTest</td><td class="code">false</td>
<td>If true, the TestList will be shuffled at random.
In this case, <code>randomSeed</code> may also be set.
</td></tr>
<tr><td class="code">inputPath</td><td class="note">null</td>
<td><b>Required</b>:
filesystem path to XML configuration file.
There is no default, and this property must be supplied.
</td></tr>
<tr><td class="code">numThreads</td><td class="code">1</td>
<td>Number of concurrent test threads.
Each thread will run all of the available tests,
unless the <code>shared</code> property is set.
</td></tr>
<tr><td class="code">outputPath</td><td class="note">null</td>
<td>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.
</td></tr>
<tr><td class="code">password</td><td class="code">admin</td>
<td>Password for all test connections.</td></tr>
<tr><td class="code">port</td><td class="code">8003</td>
<td>Host port for all test connections.
Depending on the value of <code>testType</code>,
this may be an XDBC or an HTTP server.
</td></tr>
<tr><td class="code">protocol</td><td class="code">http</td>
<td>Protocol for test. Supported valued are
<code>http</code> and <code>https</code>.
If set to <code>https</code>, SSL encryption will be used.
SSL requires MarkLogic Server 4.1 or later,
and supports only the XCC, HTTP, and URI test types.
</td></tr>
<tr><td class="code">randomSeed</td><td class="code">0</td>
<td>Seed for pseudo-random number generator.
Only useful for random tests.</td></tr>
<tr><td class="code">readSize</td><td class="code">32768</td>
<td>The buffer size, in Bytes, for network and file reads.
There is rarely any reason to change this value.
</td></tr>
<tr><td class="code">recordResults</td><td class="code">false</td>
<td>If true, the results of every test query will be recorded
in the results file.</td></tr>
<tr><td class="code">reporter</td><td class="code">XMLReporter</td>
<td>Pluggable class used to generate results files.
Supplied implementations are XMLReporter
and CSVReporter (suitable for Excel imports).
</td></tr>
<tr><td class="code">reportTime</td><td class="code">true</td>
<td>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.
</td>
</tr>
<tr><td class="code">reportPercentileDuration</td><td class="code">null</td>
<td>If non-null, one or more percentiles of (millisecond) test durations
will be reported. These values may be comma-delimited:
for example, <code>reportPercentileDuration=95,98</code>
will report the 95th-percentile
and 98th-percentile response times.
Common values are 95 and 98.
</td></tr>
<tr><td class="code">reportStandardDeviation</td><td class="code">false</td>
<td>If true, the standard deviation of test durations
will be reported, in milliseconds. The calculation is performed
per wikipedia's article on
<a href="http://en.wikipedia.org/wiki/Standard_deviation">
standard deviation</a>.
</td></tr>
<tr><td class="code">samplerClass</td><td class="code">null</td>
<td>If set, this must be the name of a subclass of the abstract
class <code>com.marklogic.performance.sampler.Sampler</code>.
Sampler classes run tests, so this overrides the built-in
<code>testType</code> values with an arbitrary user-supplied class.
For example, you could write a class that generates
application-specific web service requests,
instead of using <code>testType=HTTP</code>.
Refer to the <code>com.marklogic.performance.sampler</code>
source code for examples.
</td></tr>
<tr><td class="code">shared</td><td class="code">false</td>
<td>If true, one TestList will be shared by all threads.
In this case, the TestList must implement its own synchronization.
</td></tr>
<tr><td class="code">testTime</td>
<td class="note">0</td>
<td>
If set to a positive value, then the test will be run until
at least <code>testTime</code> 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.
</td></tr>
<tr><td class="code">testType</td><td class="code">XCC</td>
<td>Type of test to run (case-insensitive).
Supported values are XCC, HTTP, and URI.
See also the <code>samplerClass</code> property,
which allows new test types to be defined.
</td></tr>
<tr><td class="code">testListClass</td>
<td class="code">com.marklogic.performance.XMLFileTestList</td>
<td>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.
</td>
</tr>
<tr><td class="code">thinkMillis</td><td class="code">0</td>
<td>If non-zero, each sampler will sleep for the specified
number of milliseconds between tests.
</td></tr>
<tr><td class="code">user</td><td class="code">admin</td>
<td>Username for all test connections.</td></tr>
</table>
</body>
</html>