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 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363
|
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<refentry>
<refentryinfo>
<address>
<email>dim@tapoueh.org</email>
</address>
<author>
<firstname>Dimitri</firstname>
<surname>Fontaine</surname>
</author>
<date>February 2007</date>
<copyright>
<year>2006-2007</year>
<holder>Dimitri Fontaine</holder>
</copyright>
</refentryinfo>
<refmeta>
<refentrytitle>tsplot</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>tsplot</refname>
<refpurpose>
Plot several tsung logs on the same charts, for comparison purpose.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>tsplot</command>
<arg><option>-c</option> configuration file</arg>
<arg><option>-d</option> images output directory</arg>
<arg><option>-v</option> verbose</arg>
<arg>legend logfile</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
Tsung comes with a plotting tool using
<command>gnuplot</command>, producing some graphs from the
<filename>tsung.log</filename> file data.
<command>tsplot</command> is able to plot data from several
<filename>tsung.log</filename> files onto the same charts series,
for further comparison and analyze.
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<para>
</para>
<variablelist>
<varlistentry>
<term><option>-c</option></term>
<term><option>--config</option></term>
<listitem>
<para>
specifies the configuration file to use. Default is <filename>http.en.plots.conf</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d</option></term>
<term><option>--outdir</option></term>
<listitem>
<para>
directory where <command>tsplot</command> saves the images
it produces, defaults to <filename>/tmp/tsung</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option></term>
<term><option>--verbose</option></term>
<listitem>
<para>
makes <command>tsplot</command> very verbose about
what it does.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>CONFIGURATION</title>
<para>
The configuration file of <command>tsplot</command> allows one to
define the plots you want to obtain, from their label to the
data they will show. The configuration file adopts a
<filename>.ini</filename> file syntax, each section defining a
chart.
</para>
<para>
<command>tsplot</command> comes with two sample configuration
files, namely <filename>http.plots.en.conf</filename> and
<filename>pgsql.plots.en.conf</filename>. They respectively define
charts to be plotted for a <command>tsung</command> HTTP test
and a <command>tsung</command> PGSQL test.
</para>
<para>
A <command>DEFAULT</command> section may be provided, any
element configured here may then be overridden into a specific
plot section.
</para>
<para>
Another configuration file is used by <command>tsplot</command>:
the <filename>tsung/stats.conf</filename> one. It's used to
define by type the statistics to be read into
<command>tsung</command> log files, and you shouldn't need to
edit it, short of adding support for new
<command>tsung</command> statistics.
</para>
<para>
Common settings, to be found into <command>DEFAULT</command>
section or any specific chart section.
</para>
<variablelist>
<varlistentry>
<term><option>encoding</option></term>
<listitem>
<para>
set here the encoding used thereafter in the file, for
labels and titles.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>dpi</option></term>
<listitem>
<para>
dpi setting of produced charts images
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>tn_dpi</option></term>
<listitem>
<para>
dpi setting of produced charts thumbnail images
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>imgtype</option></term>
<listitem>
<para>
type of chart image to produce, as in
<filename>png</filename> or <filename>ps</filename>
</para>
<para>A complete list might be obtained on the
<command>python-matplotlib</command> website,
http://matplotlib.sourceforge.net/</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>xlabel</option></term>
<listitem>
<para>
default label for horizontal axe, often you want seconds
or minutes, depending on xfactor.
</para>
<para>
Please note you can also set some defaults for ylabel, but
this seems not to be a good idea in practise.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>xfactor</option></term>
<listitem>
<para>
tsung logs statistics in its logfile every 10 seconds. By
default, charts will not scale this and have seconds as
horizontal axis units. By setting an xfactor of 60, you
have a minute precision on horizontal axis.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>yfactor</option></term>
<listitem>
<para>
same as xfactor, but for vertical axis.
</para>
<para>
Depending on the data you obtain with your tests, you may
want to adapt the vertical scale of your plotting. For
example, the <command>page.mean</command> statistic is
logged in milliseconds by <command>tsung</command>. You
may want to display seconds if this unit better fits your
measures. Then simply set <command>yfactor =
1000</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>styles</option></term>
<listitem>
<para>
set here any number of <command>matplotlib</command>
styles you want to use, separated by spaces, as available
here:
http://matplotlib.sourceforge.net/matplotlib.pylab.html#-plot.
</para>
<para>
For example, set <command>styles = b- g+ r- cx</command>
for plotting first dataset (see <command>stats</command>
below) with a blue solid line, second with green plus
symbols, third with a red line and last with cyan cross
symbols.
</para>
<para>
This could fit a <command>stats = 200.count
400.count</command> stats setting when plotting two
<command>tsung</command> logs.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
You then can define any number of plot, one by section, and give
them an arbitrary name. The name must be unique, and will be
used for naming output images.
</para>
<para>
Any option available in DEFAULT section is also available in any
specific chart section, with the same meaning and effect. The
specific setting will systematically override the DEFAULT one.
</para>
<variablelist>
<varlistentry>
<term><option>title</option></term>
<listitem>
<para>
Title of the chart, as printed into the resulting image.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>stats</option></term>
<listitem>
<para>
The statistics properties to use for this plotting, as
named in the <filename>tsung/stats</filename>
configuration file. Please see this bundled file for a
list of what is available.
</para>
<para>
Tsung provide several types of statistics, as documented
here:
http://tsung.erlang-projects.org/user_manual.html#htoc53. The
two main types of statistics used are
<command>sample</command> and <command>counter</command>. A
third one is <command>gauge</command> but is only use for a
single statistic (users).
</para>
<para>
sample provides count, mean, stdvar, max, min and gmean
(global mean)
properties, and counter provides only count and
totalcount. gauge provide count and max.
</para>
<para>
The stats setting can accept several
<command>stat.property</command> elements, separated by
spaces.
</para>
<para>
Examples: <command>stats = users.count</command> to plot
the number of simultaneously connected users, and
<command>stats = 200.count 400.count</command> to plot
given HTTP return codes count, both on the same chart.
</para>
<para>
Please notice <command>tsplot</command> is currently
limited to use only one horizontal and only one vertical
scales. <command>matplotlib</command> is able to define
some more complex drawings, but <command>tsplot</command>
is not yet able to benefit from this.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>legend</option></term>
<listitem>
<para>
Legend prefix, which will be followed by the legend given
on command line.
</para>
<para>
Each plot on a chart has a legend entry, you configure
here the meaning of the plot (say 'concurrent users') and
<command>tsplot</command> will add it the name of the data
series being plotted (say 'scenario x'). You'd obtain this
legend: 'concurrent users scenario x'.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>ylabel</option></term>
<listitem>
<para>
label for vertical axe
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>CONFIGURATION EXAMPLE</title>
<para>
Please see the given configuration examples which should be
distributed in
<filename>/usr/share/doc/tsung/tsung-plotter/http.plots.en.conf</filename>
and
<filename>/usr/share/doc/tsung/tsung-plotter/pgsql.plots.en.conf</filename>.
</para>
</refsect1>
<refsect1>
<title>BUGS</title>
<para>
Please reports bugs to the mailing list
<email>tsung-users@process-one.net</email> or in the bug
tracker <ulink url="https://support.process-one.net/browse/TSUN"></ulink>,
see also <ulink url="https://lists.process-one.net/mailman/listinfo/tsung-users"></ulink> for
archives.
</para>
</refsect1>
<refsect1>
<title>AUTHORS</title>
<para>
<command>tsplot</command> is written by <author> <firstname>Dimitri</firstname>
<surname>Fontaine</surname></author>
<email>dim@tapoueh.org</email>.
</para>
</refsect1>
</refentry>
|