Permalink
Browse files

- include tsung-plotter tool from Dimitri Fontaine (TSUN-89)

- update to make it work with tsung 1.3.0

SVN Revision: 908
  • Loading branch information...
1 parent c1e6ec9 commit fb11e0f1506331545205fcb206a20f4acb286527 @nniclausse nniclausse committed Oct 14, 2008
View
@@ -1,7 +1,7 @@
# $Id$
-MANPAGE_SRC = tsung.1.sgml
-MANPAGE = tsung.1
+MANPAGE_SRC = tsung.1.sgml tsplot.1.sgml
+MANPAGE = tsung.1 tsplot.1
TOPDIR=$(HOME)/cvs/projetdoc/common/
IMG_TOPDIR=.
@@ -23,7 +23,7 @@ LANGUAGE=
# logos
LOGOS_JPG=
-LOGOS_EPS = $(LOGOS_JPG:.jpg=.eps)
+LOGOS_EPS = $(LOGOS_JPG:.jpg=.eps)
##############
@@ -38,22 +38,22 @@ HTML_INDEXFILES=$(TEXFILES:.tex=_index.html)
# get figures to be generated from gnuplot file
PLOT_DIR = $(IMG_TOPDIR)/plot
PLOT_PS = $(shell grep -s output $(PLOT_DIR)/*.gplot | cut -f3 -d" " | perl -e '{ while (<>) {chomp; s/"//;s/"/ /; print} }')
-PLOT=$(addprefix $(PLOT_DIR)/,$(PLOT_PS))
+PLOT=$(addprefix $(PLOT_DIR)/,$(PLOT_PS))
#PLOT = $(wildcard $(PLOT_DIR)/*.ps)
-PLOT_PNG = $(PLOT:.ps=.png)
-PLOT_PDF = $(PLOT:.ps=.pdf)
+PLOT_PNG = $(PLOT:.ps=.png)
+PLOT_PDF = $(PLOT:.ps=.pdf)
# figures
FIGURES_DIR = $(IMG_TOPDIR)/figures
FIGURES = $(wildcard $(FIGURES_DIR)/*.fig)
-FIGURES_PNG = $(FIGURES:.fig=.png)
-#FIGURES_JPG = $(FIGURES:.fig=.jpg)
-FIGURES_EPS = $(FIGURES_PNG:.png=.eps)
+FIGURES_PNG = $(FIGURES:.fig=.png)
+#FIGURES_JPG = $(FIGURES:.fig=.jpg)
+FIGURES_EPS = $(FIGURES_PNG:.png=.eps)
# images
IMAGES_DIR = $(IMG_TOPDIR)/images
IMAGES_PNG = $(wildcard $(IMAGES_DIR)/*.png)
-IMAGES_EPS = $(IMAGES_PNG:.png=.eps)
+IMAGES_EPS = $(IMAGES_PNG:.png=.eps)
ALL_IMG = $(notdir $(FIGURES))
ALL_IMG += $(notdir $(IMAGES_PNG))
@@ -76,7 +76,7 @@ LATEX=latex --interaction=batchmode
BIBTEX=bibtex
FIG2DEV=fig2dev
VIEWER=gv
-HEVEA=hevea
+HEVEA=hevea
HACHA=hacha
IMAGEN=imagen
MAKEINDEX=makeindex
@@ -94,7 +94,7 @@ VPATH = $(TEXINPUTS)
# pour exporter TEXINPUTS
.EXPORT_ALL_VARIABLES:
-.PHONY: clean distclean pdf dvi ps all html htmlsingle
+.PHONY: clean distclean pdf dvi ps all html htmlsingle
# Stop GNU make from overzealous deletion of intermediate files
.PRECIOUS: %.dvi $(FIGURES_PNG) $(FIGURES_JPG) $(IMAGES_EPS) $(LOGOS_EPS) $(PLOT) $(PLOT_PNG) $(PLOT_PDF)
@@ -117,9 +117,9 @@ show:
@echo IMG= $(IMAGES_PNG)
@echo HEVEA= $(HEVEA_INC)
@echo PLOT= $(PLOT_PNG)
- @echo TEX = $(TEXFILES)
- @echo HTML = $(HTMLFILES)
- @echo LOGOS = $(LOGOS_EPS)
+ @echo TEX = $(TEXFILES)
+ @echo HTML = $(HTMLFILES)
+ @echo LOGOS = $(LOGOS_EPS)
@echo ALL_IMG = $(ALL_IMG)
@echo TEXINPUTS = $(TEXINPUTS)
@@ -134,7 +134,7 @@ html: $(HTMLFILES)
htmlsplit: $(HTML_INDEXFILES)
print: $(PSFILES)
@echo "printing $<"
- a2ps $<
+ a2ps $<
#glossaire:
# $(MAKEINDEX) -s tlglo.ist -o these.gls these.glo
@@ -152,19 +152,19 @@ user_manual.html: user_manual.tex $(INCLUDES) $(FIGURES_PNG) $(IMAGES_PNG) $(HEV
@$(HEVEA) $(HEVEAOPTS) $(LANGUAGE) $(HEVEA_INC) $<
ifeq ($(strip $(IMAGES_PNG)),)
@echo no images
-else
+else
@echo Generating images for html...
@ln -sf $(IMAGES_DIR)/*.png .
endif
ifeq ($(strip $(FIGURES_PNG)),)
@echo no figures
-else
+else
@echo Generating figures for html...
@ln -sf $(FIGURES_DIR)/*.png .
endif
ifeq ($(strip $(PLOT_PNG)),)
@echo no plot
-else
+else
@echo Generating plot for html...
@ln -sf $(PLOT_DIR)/*.png .
endif
@@ -233,35 +233,35 @@ $(PLOT_DIR)/%.ps: $(PLOT_DIR)/*.gplot
$(PLOT_DIR)/%.png: $(PLOT_DIR)/%.ps
@echo Generating $@
- @$(CONVERT) $< $@
+ @$(CONVERT) $< $@
$(PLOT_DIR)/%.pdf: $(PLOT_DIR)/%.ps
@echo Generating $@
@$(EPS2PDF) $<
$(FIGURES_DIR)/%.png: $(FIGURES_DIR)/%.fig
@echo Generating $@
- @$(FIG2DEV) -L png $< $@
+ @$(FIG2DEV) -L png $< $@
$(FIGURES_DIR)/%.jpg: $(FIGURES_DIR)/%.fig
@echo Generating $@
- @$(FIG2DEV) -L jpeg $< $@
+ @$(FIG2DEV) -L jpeg $< $@
$(FIGURES_DIR)/%.eps: $(FIGURES_DIR)/%.fig
@echo Generating $@
- @$(FIG2DEV) -L eps $< $@
+ @$(FIG2DEV) -L eps $< $@
$(IMAGES_DIR)/%.jpg: $(IMAGES_DIR)/%.png
@echo Generating $@
- @$(CONVERT) $< $@
+ @$(CONVERT) $< $@
$(IMAGES_DIR)/%.eps: $(IMAGES_DIR)/%.png
@echo Generating $@
- @$(CONVERT) $< $@
+ @$(CONVERT) $< $@
$(LOGO_DIR)/%.eps: $(IMAGES_DIR)/%.jpg
@echo Generating $@
- @$(CONVERT) $< $@
+ @$(CONVERT) $< $@
mrproper: distclean
View
@@ -0,0 +1,202 @@
+.\" This manpage has been automatically generated by docbook2man
+.\" from a DocBook document. This tool can be found at:
+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
+.\" Please send any bug reports, improvements, comments, patches,
+.\" etc. to Steve Cheng <steve@ggi-project.org>.
+.TH "TSPLOT" "1" "14 octobre 2008" "" ""
+
+.SH NAME
+tsplot \- Plot several tsung logs on the same charts, for comparison purpose.
+.SH SYNOPSIS
+
+\fBtsplot\fR [ \fB-c configuration file\fR ] [ \fB-d images output directory\fR ] [ \fB-v verbose\fR ] [ \fBlegend logfile\fR ]
+
+.SH "DESCRIPTION"
+.PP
+Tsung comes with a plotting tool using
+\fBgnuplot\fR, producing some graphs from the
+\fItsung.log\fR file data.
+\fBtsplot\fR is able to plot data from several
+\fItsung.log\fR files onto the same charts serie,
+for further comparison and analyze.
+.SH "OPTIONS"
+.PP
+.TP
+\fB-c\fR
+.TP
+\fB--config\fR
+specifies the configuration file to use. This option has
+no default setting.
+.TP
+\fB-d\fR
+.TP
+\fB--outdir\fR
+directory where \fBtsplot\fR saves the images
+it produces, defaults to \fI/tmp/tsung\fR\&.
+.TP
+\fB-v\fR
+.TP
+\fB--verbose\fR
+makes \fBtsplot\fR very verbose about
+what it does.
+.SH "CONFIGURATION"
+.PP
+The configuration file of \fBtsplot\fR allows to
+define the plots you want to obtain, from their label to the
+data they will show. The configuration file adopts a
+\fI\&.ini\fR file syntax, each section defining a
+chart.
+.PP
+\fBtsplot\fR comes with two sample configuration
+files, namely \fIhttp.plots.conf\fR and
+\fIpgsql.plots.conf\fR\&. They respectively define
+charts to be plotted for a \fBtsung\fR HTTP test
+and a \fBtsung\fR PGSQL test. Their labels are in
+french.
+.PP
+A \fBDEFAULT\fR section may be provided, any
+element configured here may then be overriden into a specific
+plot section.
+.PP
+Another configuration file is used by \fBtsplot\fR:
+the \fItsung/stats.conf\fR one. It's used to
+define by type the statistics to be read into
+\fBtsung\fR log files, and you shouldn't need to
+edit it, short of adding support for new
+\fBtsung\fR statistics.
+.PP
+Common settings, to be found into \fBDEFAULT\fR
+section or any specific chart section.
+.TP
+\fBencoding\fR
+set here the encoding used thereafter in the file, for
+labels and titles.
+.TP
+\fBdpi\fR
+dpi setting of produced charts images
+.TP
+\fBtn_dpi\fR
+dpi setting of produced charts thumbnail images
+.TP
+\fBimgtype\fR
+type of chart image to produce, as in
+\fIpng\fR or \fIps\fR
+
+A complete list might be obtained on the
+\fBpython-matplotlib\fR website,
+http://matplotlib.sourceforge.net/
+.TP
+\fBxlabel\fR
+default label for horizontal axe, often you want seconds
+or minutes, depending on xfactor.
+
+Please note you can also set some defaults for ylabel, but
+this seems not to be a good idea in practise.
+.TP
+\fBxfactor\fR
+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.
+.TP
+\fByfactor\fR
+same as xfactor, but for vertical axis.
+
+Depending on the data you obtain with your tests, you may
+want to adapt the vertical scale of your plotting. For
+example, the \fBpage.mean\fR statistic is
+logged in milliseconds by \fBtsung\fR\&. You
+may want to display seconds if this unit better fits your
+measures. Then simply set \fByfactor =
+1000\fR\&.
+.TP
+\fBstyles\fR
+set here any number of \fBmatplotlib\fR
+styles you want to use, separated by spaces, as available
+here:
+http://matplotlib.sourceforge.net/matplotlib.pylab.html#-plot.
+
+For exemple, set \fBstyles = b- g+ r- cx\fR
+for plotting first dataset (see \fBstats\fR
+below) with a blue solid line, second with green plus
+symbols, third with a red line and last with cyan cross
+symbols.
+
+This could fit a \fBstats = 200.count
+400.count\fR stats setting when plotting two
+\fBtsung\fR logs.
+.PP
+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.
+.PP
+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.
+.TP
+\fBtitle\fR
+Title of the chart, as printed into the resulting image.
+.TP
+\fBstats\fR
+The statistics properties to use for this plotting, as
+named in the \fItsung/stats\fR
+configuration file. Please see this bundled file for a
+list of what is available.
+
+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
+\fBsample\fR and \fBcounter\fR\&. A
+third one is \fBgauge\fR but is only use for a
+single statistic (users).
+
+sample provides count, mean, stdvar, max, min and gmean
+(global mean)
+properties, and counter provides only count and
+totalcount. gauge provide count and max.
+
+The stats setting can accept several
+\fBstat.property\fR elements, separated by
+spaces.
+
+Examples: \fBstats = users.count\fR to plot
+the number of simultaneously connected users, and
+\fBstats = 200.count 400.count\fR to plot
+given HTTP return codes count, both on the same chart.
+
+Please notice \fBtsplot\fR is currently
+limited to use only one horizontal and only one vertical
+scales. \fBmatplotlib\fR is able to define
+some more complex drawings, but \fBtsplot\fR
+is not yet able to benefit from this.
+.TP
+\fBlegend\fR
+Legend prefix, which will be followed by the legend given
+on command line.
+
+Each plot on a chart has a legend entry, you configure
+here the meaning of the plot (say 'concurrent users') and
+\fBtsplot\fR will add it the name of the data
+serie being plotted (say 'scenario x'). You'd obtain this
+legend: 'concurrent users scenario x'.
+.TP
+\fBylabel\fR
+label for vertical axe
+.SH "CONFIGURATION EXAMPLE"
+.PP
+Please see the given configuration examples which should be
+distributed in
+\fI/usr/share/doc/tsung-plotter/http.plots.conf\fR
+and
+\fI/usr/share/doc/tsung-plotter/pgsql.plots.conf\fR\&.
+.SH "BUGS"
+.PP
+Please reports bugs to the mailing list
+<tsung-users@process-one.net>, see
+https://lists.process-one.net/mailman/listinfo/tsung-users for
+archives.
+.SH "AUTHORS"
+.PP
+\fBtsplot\fR is written by Dimitri
+Fontaine <dim@tapoueh.org>\&.
Oops, something went wrong.

0 comments on commit fb11e0f

Please sign in to comment.