Skip to content

Commit

Permalink
modifs en vue de publication v1.0.beta3
Browse files Browse the repository at this point in the history
SVN Revision: 241
  • Loading branch information
nniclausse committed Feb 24, 2004
1 parent b045e96 commit 73f9306
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 30 deletions.
10 changes: 6 additions & 4 deletions CHANGES
@@ -1,11 +1,13 @@
1.0.beta2 -> 1.0.beta2 -> 1.0.beta3: Minor feature enhancements (24 Feb 2004)
- fix stupid bug in start script for recorder - fix stupid bug in start script for recorder
- HTTP: fix '&' writes in the XML recorder fon 'content' attribute - HTTP: fix '&' writes in the XML recorder for 'content' attribute
- HTTP: enchanced Cookies parsing. - HTTP: enhanced Cookies parsing ('domain' and 'path' implemtented).
- ssl_ciphers can be customized
- change log directory structure: all log files in one directory per test - change log directory structure: all log files in one directory per test
- add HTML reports (requires the perl Template toolkit) - add HTML reports (requires the perl Template toolkit)
- change stats names: page_resptime -> page, response_time -> request


1.0.beta1 -> 1.0.beta2: Minor feature enhancements (11 Feb 2004) 1.0.beta1 -> 1.0.beta2: Minor feature enhancements (11 Feb 2004)
- reorganise the sources - reorganise the sources
- add tools to build a debian package - add tools to build a debian package
- fix documentations - fix documentations
Expand Down
22 changes: 16 additions & 6 deletions LISEZMOI
Expand Up @@ -91,7 +91,8 @@
la notation <tag></tag> ) la notation <tag></tag> )


- gnuplot et perl5 (optionel, utilis� pour les sorties graphiques du script - gnuplot et perl5 (optionel, utilis� pour les sorties graphiques du script
analyse_msg.pl) analyse_msg.pl). Le Template Toolkit est utilis� pour les rapports en HTML
(cf. http://template-toolkit.org/)


- les tests distribu�s utilisent un acc�s ssh non int�ractif pour - les tests distribu�s utilisent un acc�s ssh non int�ractif pour
d�marrer Erlang � distance. Il faut donc utiliser une cl� RSA/DSA, d�marrer Erlang � distance. Il faut donc utiliser une cl� RSA/DSA,
Expand Down Expand Up @@ -129,8 +130,8 @@
de log, par d�faut 'idx-tsunami.log-YYYY:MM:DD-HH:mm' de log, par d�faut 'idx-tsunami.log-YYYY:MM:DD-HH:mm'


Les mesures suivantes sont disponibles: Les mesures suivantes sont disponibles:
- response_time (temps de r�ponse pour chaque requ�te (~ requ�te pour HTTP)) - response_time (temps de r�ponse pour chaque requ�te)
- page_resptime (response time pour chaque ensemble de requ�te (~ page pour HTTP)) - page_resptime (response time pour chaque ensemble de requ�te)
- connect (dur�e pour effectuer la connexion) - connect (dur�e pour effectuer la connexion)
- reconnect (nombre de reconnexion) - reconnect (nombre de reconnexion)
- size (taille des r�ponses) - size (taille des r�ponses)
Expand All @@ -140,10 +141,19 @@
mesures sp�cifiques � HTTP : mesures sp�cifiques � HTTP :
- un compteur pour chaque type de r�ponse (200, 404, etc.) - un compteur pour chaque type de r�ponse (200, 404, etc.)


Depuis la version v1.0.beta1, il est possible de customiser Depuis la version v1.0.beta1, il est possible de customiser
les mesures en d�finissant des "transactions" dans les les mesures en d�finissant des "transactions" dans les
sessions. sessions. L'option --extra est n�cessaire pour afficher les
statistiques os_mon (cpu, m�moire libre)

Depuis la version v1.0.beta3, un rapport HTML peut �tre g�n�rer
en utilisant l'option --html. Ceci utilise le Template
Toolkit. Le r�pertoire contenenant les templates est
~/idx-tsunami/templates ou /usr/share/idx-tsunami/template ou
encore peut �tre configur� par --tdir <dir>


Ex: > cd ~/.idx-tsunami/log/2004YYYY-XX:XX
> analyse_msg.pl --stats idx-tsunami.log --extra --html


4/ Pour utiliser le proxy enregistreur de sessions HTTP depuis un 4/ Pour utiliser le proxy enregistreur de sessions HTTP depuis un
navigateur, il faut d'abord d�marrer le proxy avec la commande navigateur, il faut d'abord d�marrer le proxy avec la commande
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -28,6 +28,7 @@ ERLANG_INSTALL_DIR = $(DESTDIR)/$(RAW_INSTALL_DIR)/lib
BINDIR = $(DESTDIR)/usr/bin BINDIR = $(DESTDIR)/usr/bin
LIBDIR = $(DESTDIR)/usr/lib/idx-tsunami/bin/ LIBDIR = $(DESTDIR)/usr/lib/idx-tsunami/bin/
CONFDIR = $(DESTDIR)/usr/share/doc/idx-tsunami/examples CONFDIR = $(DESTDIR)/usr/share/doc/idx-tsunami/examples
TEMPLATES_DIR = $(DESTDIR)/usr/share/idx-tsunami/templates




PACKAGE = idx-tsunami PACKAGE = idx-tsunami
Expand All @@ -39,6 +40,7 @@ RECORDER_TARGETDIR = $(ERLANG_INSTALL_DIR)/$(RECORDER_APPLICATION)-$(VERSION)
CONTROLLER_TARGETDIR = $(ERLANG_INSTALL_DIR)/$(CONTROLLER_APPLICATION)-$(VERSION) CONTROLLER_TARGETDIR = $(ERLANG_INSTALL_DIR)/$(CONTROLLER_APPLICATION)-$(VERSION)
TARGETDIR = $(ERLANG_INSTALL_DIR)/$(APPLICATION)-$(VERSION) TARGETDIR = $(ERLANG_INSTALL_DIR)/$(APPLICATION)-$(VERSION)


TEMPLATES = $(wildcard $(ESRC)/templates/*.thtml)
TMP = $(wildcard *~) $(wildcard src/*~) $(wildcard inc/*~) TMP = $(wildcard *~) $(wildcard src/*~) $(wildcard inc/*~)
INC_FILES = $(wildcard $(INC)/*.hrl) INC_FILES = $(wildcard $(INC)/*.hrl)
SRC = $(wildcard $(ESRC)/$(APPLICATION)/*.erl) SRC = $(wildcard $(ESRC)/$(APPLICATION)/*.erl)
Expand Down Expand Up @@ -117,6 +119,9 @@ install: doc build idx-tsunami.sh analyse_msg.pl install_recorder install_contro
mkdir -p $(CONFDIR) mkdir -p $(CONFDIR)
cp $(CONFFILES) $(CONFDIR) cp $(CONFFILES) $(CONFDIR)


mkdir -p $(TEMPLATES_DIR)
cp $(TEMPLATES) $(TEMPLATES_DIR)

install_recorder: install_recorder:
install -d $(RECORDER_TARGETDIR)/priv install -d $(RECORDER_TARGETDIR)/priv
install -d $(RECORDER_TARGETDIR)/ebin install -d $(RECORDER_TARGETDIR)/ebin
Expand Down
37 changes: 26 additions & 11 deletions README
Expand Up @@ -81,24 +81,28 @@
xmerl-0.15 should work, but the notation <tag/> is not supported xmerl-0.15 should work, but the notation <tag/> is not supported
by this version (use instead the full <tag></tag> notation) by this version (use instead the full <tag></tag> notation)


- gnuplot and perl5 (optional; for graphical output with analyse_msg.pl script) - gnuplot and perl5 (optional; for graphical output with
analyse_msg.pl script). The Template Toolkit is used for HTML
reports (see http://template-toolkit.org/)


- for distributed tests, you need an ssh access to remote machines - for distributed tests, you need an ssh access to remote machines
without passwd (use a RSA/DSA key without passphrase or ssh-agent) without passwd (use a RSA/DSA key without passphrase or ssh-agent)


2.2. Compilation and Installation 2.2. Compilation and Installation


Edit Makefile if you want to change the install path (prefix) Edit Makefile if you want to change the install path (prefix)
(/usr/lib/erlang/... by default for beam files). Default (/usr/lib/erlang/... by default for beam files).
configuration and log files are saved in ~/.idx-tsunami/ )


make make
make install make install


How to use it: How to use it:
1a/ Edit ~/.idx-tsunami/idx-tsunami.xml file (read the comments 1a/ Edit ~/.idx-tsunami/idx-tsunami.xml file (read the comments
for explanation on the parameters, there is a sample file for explanation on the parameters, there is a sample file
/usr/share/doc/idx-tsunami/examples/idx-tsunami.xml) /usr/share/doc/idx-tsunami/examples/idx-tsunami.xml). Log files
are saved in ~/.idx-tsunami/log/ . A new subdirectory is created
for each test using the current date as name
(~/.idx-tsunami/log/20040217-09:40 for ex.)


1b/ Read the doc/Jabber.txt file for Jabber-specific information. 1b/ Read the doc/Jabber.txt file for Jabber-specific information.


Expand All @@ -107,19 +111,19 @@


3/ When it's finished, or during the test, you can use 3/ When it's finished, or during the test, you can use
analyse_msg.pl ( located in /usr/lib/idx-tsunami/bin/analyse_msg.pl) analyse_msg.pl ( located in /usr/lib/idx-tsunami/bin/analyse_msg.pl)
to get statistical results from the logfile. to get statistical results from the logfile.


Since v0.2.0, you can have 'realtime' stats using with the Since v0.2.0, you can have 'realtime' stats using with the
--stats and --plot option. It will --stats and --plot option. It will
generate graphics in postscript using gnuplot. The --stats generate graphics in postscript using gnuplot. The --stats
option requires a logfile, by default it is named option requires a logfile, by default it is named
'idx-tsunami.log-YYYY:MM:DD-HH:mm' 'idx-tsunami.log'
Every 10sec (default value), stats are dump in that log file, Every 10sec (default value), stats are dump in that log file,
and the script can create graphics about the current activity. and the script can create graphics about the current activity.


Availables stats: Availables stats:
- response_time (response time for each request (~ request for HTTP)) - request (response time for each request)
- page_resptime (response time for each set of requests (~ page for HTTP)) - page (response time for each set of requests)
- connect (duration of the connection) - connect (duration of the connection)
- reconnect (number of reconnection) - reconnect (number of reconnection)
- size (size of responses) - size (size of responses)
Expand All @@ -130,7 +134,18 @@
- counter for each response status (200, 404, etc.) - counter for each response status (200, 404, etc.)


Since v1.0.beta1, you can customize statistics using Since v1.0.beta1, you can customize statistics using
"transactions" in session definition. "transactions" in session definition. The --extra option is
required to print the os_mon statistics (monitoring of cpu and
freemem)

Since v1.0.beta3, you can add --html to analyse_msg.pl to have
a nice HTML report (this requires the perl Template
toolkit). The template directory is ~/idx-tsunami/templates or
/usr/share/idx-tsunami/template or can be set with --tdir <dir>
This will create two files report.html and graph.html

Ex: > cd ~/.idx-tsunami/log/2004YYYY-XX:XX
> analyse_msg.pl --stats idx-tsunami.log --extra --html


4/ To start the proxy recorder for HTTP sessions, use the command 4/ To start the proxy recorder for HTTP sessions, use the command
'idx-tsunami recorder'. The proxy will start listening to the 'idx-tsunami recorder'. The proxy will start listening to the
Expand All @@ -145,7 +160,7 @@
2.4. Platform Issues 2.4. Platform Issues


This package has only be tested on Linux. It should work This package has only be tested on Linux. It should work
on Erlang supported platforms (Solaris, *BSD, and maybe Win32) on Erlang supported platforms (Solaris, *BSD, and maybe Win32)






5 changes: 2 additions & 3 deletions TODO
@@ -1,11 +1,10 @@


P2 add SNMP support to remote monitoring of servers P2 add SNMP support to remote monitoring of servers
P2 test updated jabber modules with a real jabber server P2 test updated jabber modules with a real jabber server
P2 better report/graphics generation P2 improve documentation


P3 improve documentation P3 better report/graphics generation
P3 other useful protocols: ftp, smtp, ldap, sql ... ? P3 other useful protocols: ftp, smtp, ldap, sql ... ?
P3 handle all cookies attributes


P4 learn how to really use xmerl P4 learn how to really use xmerl
P4 add a web interface ? P4 add a web interface ?
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
@@ -1,3 +1,9 @@
idx-tsunami (1.0.beta3-1) unstable; urgency=low

* New upstream release

-- Nicolas Niclausse <nicolas.niclausse@IDEALX.com> Tue, 24 Feb 2004 19:06:03 +0100

idx-tsunami (1.0.beta2-1) unstable; urgency=low idx-tsunami (1.0.beta2-1) unstable; urgency=low


* Initial Release. * Initial Release.
Expand Down
1 change: 1 addition & 0 deletions debian/idx-tsunami.dirs
@@ -1,3 +1,4 @@
usr/bin/ usr/bin/
usr/lib/erlang/lib usr/lib/erlang/lib
usr/lib/idx-tsunami/bin usr/lib/idx-tsunami/bin
usr/share/idx-tsunami/templates
12 changes: 9 additions & 3 deletions src/analyse_msg.pl.src
Expand Up @@ -27,7 +27,7 @@


use strict; use strict;
use Getopt::Long; use Getopt::Long;
use vars qw ($help @files $verbose $debug $plot $extra $version $stats $template_dir $html); use vars qw ($help @files $verbose $debug $plot $extra $version $stats $template_dir $html $template_dir);
my $tagvsn = '%VERSION%'; my $tagvsn = '%VERSION%';


GetOptions( "help",\$help, GetOptions( "help",\$help,
Expand All @@ -46,7 +46,14 @@ GetOptions( "help",\$help,


my $maxval; my $maxval;
my $category; my $category;
my $template_dir = "$ENV{HOME}/.idx-tsunami/templates/" unless $template_dir;
unless ($template_dir) {
if (-d "$ENV{HOME}/.idx-tsunami/templates/") {
$template_dir = "$ENV{HOME}/.idx-tsunami/templates/";
} elsif (-d "/usr/share/idx-tsunami/templates") {
$template_dir = "/usr/share/idx-tsunami/templates";
}
}


my $datadir = "data"; # all data files are created in this subdirectory my $datadir = "data"; # all data files are created in this subdirectory
my $imgdir = "images"; # all data files are created in this subdirectory my $imgdir = "images"; # all data files are created in this subdirectory
Expand Down Expand Up @@ -281,7 +288,6 @@ sub parse_stats_file {


sub html_report { sub html_report {
require Template; require Template;
require Template::Plugin::Table;
my $titre = 'IDX-Tsunami '; my $titre = 'IDX-Tsunami ';
my $version = $tagvsn; my $version = $tagvsn;
my $contact = "nicolas.niclausse\@IDEALX.com"; my $contact = "nicolas.niclausse\@IDEALX.com";
Expand Down
4 changes: 2 additions & 2 deletions src/tsunami/ts_client_rcv.erl
Expand Up @@ -257,12 +257,12 @@ handle_data_msg(Data, State=#state_rcv{ack_done=false}) ->
update_stats(State, Close) -> update_stats(State, Close) ->
Now = now(), Now = now(),
Elapsed = ts_utils:elapsed(State#state_rcv.ack_timestamp, Now), Elapsed = ts_utils:elapsed(State#state_rcv.ack_timestamp, Now),
Stats= [{ sample, response_time, Elapsed}, Stats= [{ sample, request, Elapsed},
{ sum, size, State#state_rcv.datasize}], { sum, size, State#state_rcv.datasize}],
case State#state_rcv.endpage of case State#state_rcv.endpage of
true -> % end of a page, compute page reponse time true -> % end of a page, compute page reponse time
PageElapsed = ts_utils:elapsed(State#state_rcv.page_timestamp, Now), PageElapsed = ts_utils:elapsed(State#state_rcv.page_timestamp, Now),
ts_mon:add(lists:append([Stats,[{sample, page_resptime, PageElapsed}]])), ts_mon:add(lists:append([Stats,[{sample, page, PageElapsed}]])),
doack(State#state_rcv.ack, State#state_rcv.ppid, doack(State#state_rcv.ack, State#state_rcv.ppid,
State#state_rcv.dyndata, Close), State#state_rcv.dyndata, Close),
0; 0;
Expand Down
2 changes: 1 addition & 1 deletion vsn.mk
@@ -1,2 +1,2 @@
IDX-TSUNAMI_VSN = 1.0.beta2 IDX-TSUNAMI_VSN = 1.0.beta3


0 comments on commit 73f9306

Please sign in to comment.