Author: mlebas@labeille.net
Date: Mon Jun 12 15:27:32 2006
New Revision: 3549
Log:
Plus propre et plus facile
Added:
_dev_/perf/url_priv_ref
- copied unchanged from r3548, _dev_/perf/work_priv
_dev_/perf/url_priv_tst
- copied unchanged from r3548, _dev_/perf/svn_priv
_dev_/perf/url_pub_ref
- copied unchanged from r3548, _dev_/perf/work_pub
_dev_/perf/url_pub_tst
- copied unchanged from r3548, _dev_/perf/svn_pub
Removed:
_dev_/perf/svn_priv
_dev_/perf/svn_pub
_dev_/perf/work_priv
_dev_/perf/work_pub
Modified:
_dev_/perf/cmpb
_dev_/perf/cmphisto
_dev_/perf/cmpv
Modified: _dev_/perf/cmpb
--- _dev_/perf/cmpb (original)
+++ _dev_/perf/cmpb Mon Jun 12 15:27:32 2006
@@ -1,24 +1,31 @@
#!/bin/sh
-# Performances SPIP pour la partie PUBLIQUE
+# Comparaison temps SPIP pour la partie PUBLIQUE
# On mesure le gain d'une version TST par rapport a une version REF
# au moyen de 2 mesures (avec et sans cache) dont chacune
# comporte NE echantillons ; NE est en parametre du script (defaut = 1)
#
# Gain = (temps_REF - temps_TST)/temps_REF
#
-# Les squelettes et bases SQL sont censes etre identiques pour TST et REF
# la mesure est faite par 'time wget' avec une liste d'URL significative
+# Le jeu d'URL doit etre coherent avec la base SQL
#
NE=1
#
-# Ici on definit REF et TST avec le chemin du CACHE et celui du jeu d'URLs
+# Ici on definit REF et TST avec le chemin de la racine et celui du jeu d'URLs
# Les chemins doivent etre absolus
#
-WWW=/Library/WebServer/Documents
-CACHE_REF=$WWW/work/CACHE
-CACHE_TST=$WWW/svn/CACHE
-URL_REF=$HOME/perf/work_pub
-URL_TST=$HOME/perf/svn_pub
+if [ -z "$WWW_REF" ]; then
+ WWW_REF=/Library/WebServer/Documents/work
+fi
+if [ -z "$WWW_TST" ]; then
+ WWW_TST=/Library/WebServer/Documents/svn
+fi
+if [ -z "$URL_PUB_REF" ]; then
+ URL_PUB_REF=$HOME/perf/url_pub_ref
+fi
+if [ -z "$URL_PUB_TST" ]; then
+ URL_PUB_TST=$HOME/perf/url_pub_tst
+fi
choix_time () {
# time doit accepter -p pour garantir un format standard
@@ -31,7 +38,7 @@
echantillon () {
# on utilise un repertoire de travail tmp pour wget
# Destruction du cache et de tmp
- rm -rf tmp $1/* > /dev/null 2>&1
+ rm -rf tmp $1/CACHE/* > /dev/null 2>&1
mkdir tmp
cd tmp
printf "###### $2 sans cache: "
@@ -47,8 +54,8 @@
while true; do
if [ $CNT -eq $NE ]; then return; fi
CNT=`expr $CNT + 1`
- echantillon $CACHE_REF REF $URL_REF >> res 2>&1
- echantillon $CACHE_TST TST $URL_TST >> res 2>&1
+ echantillon $WWW_REF REF $URL_PUB_REF >> res 2>&1
+ echantillon $WWW_TST TST $URL_PUB_TST >> res 2>&1
done
}
@@ -56,10 +63,8 @@
# Main
#
if [ ! -z "$1" ]; then NE=$1; fi
-# Pour la portabilite on choisit la commande time
choix_time >/dev/null 2>&1
-# La mesure
-NU=`cat $URL_REF|wc -l`
+NU=`cat $URL_PUB_REF|wc -l`
echo "echantillons : $NE, URLs par echantillon = $NU"
boucle
#
Modified: _dev_/perf/cmphisto
--- _dev_/perf/cmphisto (original)
+++ _dev_/perf/cmphisto Mon Jun 12 15:27:32 2006
@@ -1,36 +1,43 @@
#!/bin/sh
-# Acquisition de plusieurs SVN pour comparaison avec une meme reference
-# (necessite acces svn pour acquisition des N versions)
-# Prendre garde à capturer stdout pour filtrer les messages svn
+# Acquisition de plusieurs SVN dans TST pour comparaison avec une meme reference REF
+# Pour une comparaison iso-squelette, le script installe la dist REF dans TST
+# (Cf. les cp et mv qu'on peut toujours oter)
+# les 2 scripts cmpb et cmpv doivent etre dans le PATH
+# S'assurer de l'acces privé
#
-# les 2 scripts de comparaison cmpb et cmpv doivent etre dans le PATH
-# et personnalises comme indique dans les commentaires des dits scripts
+# Racine site
+#
+WWW_REF=/Library/WebServer/Documents/work
+WWW_TST=/Library/WebServer/Documents/svn
+#
+# Jeux d'URL public et prives
+#
+URL_PUB_REF=$HOME/perf/url_pub_ref
+URL_PUB_TST=$HOME/perf/url_pub_tst
+URL_PRIV_REF=$HOME/perf/url_priv_ref
+URL_PRIV_TST=$HOME/perf/url_priv_tst
+export WWW_REF WWW_TST URL_PUB_REF URL_PUB_TST URL_PRIV_REF URL_PRIV_TST
#
-# puis personnaliser les variables qui suivent :
-# Emplacement du site SVN
-SVN=/Library/WebServer/Documents/svn
-# Dossier dist reference (1.8)
-DIST=/Library/WebServer/Documents/work/dist
# Nombre d'echantillons
NE=5
compare () {
- svn up --revision {$1} $SVN
- echo "##### Comparaison 1.8 / SVN $1 partie privee"
+ echo "Mise a jour SVN $1"
+ svn up --revision $1 $WWW_TST > /dev/null
+ if [ $? -ne 0 ]; then return; fi
+ echo "##### Comparaison REF / SVN $1 partie privee"
cmpv $NE
- echo "##### Comparaison 1.8 dist / SVN $1 dist"
- # on installe la dist reference, le temps de la mesure
- mv $SVN/dist $SVN/dist.svn
- cp -r $DIST $SVN/dist
+ echo "##### Comparaison REF / SVN $1 partie publique"
+ # on installe dist.ref, le temps de la mesure
+ mv $WWW_TST/dist $WWW_TST/dist.tst
+ cp -r $WWW_REF/dist $WWW_TST/dist
cmpb $NE
- rm -rf $SVN/dist
- # on remet en place la dist svn pour garder svn coherent
- mv $SVN/dist.svn $SVN/dist
+ # on remet en place dist.tst pour garder svn coherent
+ rm -rf $WWW_TST/dist
+ mv $WWW_TST/dist.tst $WWW_TST/dist
}
-compare "2006-04-01"
-compare "2006-04-15"
-compare "2006-05-01"
-compare "2006-05-15"
-compare "2006-06-01"
-compare "2006-06-10"
+#compare {2006-04-01}
+#compare 6402
+#compare 6403
+#compare 6580
Modified: _dev_/perf/cmpv
--- _dev_/perf/cmpv (original)
+++ _dev_/perf/cmpv Mon Jun 12 15:27:32 2006
@@ -1,21 +1,27 @@
#!/bin/sh
-# Performances SPIP pour la partie PRIVEE
+# Comparaison temps SPIP pour la partie PRIVEE
# On mesure le gain d'une version TST par rapport a une version REF
# au moyen d'une mesure comportant NE echantillons
# NE est en parametre du script (defaut = 1)
#
# Gain = (temps_REF - temps_TST)/temps_REF
#
-# Les bases SQL sont censes etre identiques pour TST et REF
# la mesure est faite par 'time wget' avec une liste d'URL significative
+# Les bases SQL sont censes etre identiques pour TST et REF
+# Le jeu d'URL doit etre coherent avec la base SQL
+# S'assurer de l'acces privé
#
NE=1
#
# Ici on definit REF et TST avec le jeu d'URLs
# Les chemins doivent etre absolus
#
-URL_REF=$HOME/perf/work_priv
-URL_TST=$HOME/perf/svn_priv
+if [ -z "$URL_PRIV_REF" ]; then
+ URL_PRIV_REF=$HOME/perf/url_priv_ref
+fi
+if [ -z "$URL_PRIV_TST" ]; then
+ URL_PRIV_TST=$HOME/perf/url_priv_tst
+fi
choix_time () {
# time doit accepter -p pour garantir un format standard
@@ -42,8 +48,8 @@
while true; do
if [ $CNT -eq $NE ]; then return; fi
CNT=`expr $CNT + 1`
- echantillon REF $URL_REF >> res 2>&1
- echantillon TST $URL_TST >> res 2>&1
+ echantillon REF $URL_PRIV_REF >> res 2>&1
+ echantillon TST $URL_PRIV_TST >> res 2>&1
done
}
@@ -51,10 +57,10 @@
# Main
#
if [ ! -z "$1" ]; then NE=$1; fi
-# Pour la portabilite on choisit la commande time
+# on determine la bonne comande time
choix_time >/dev/null 2>&1
-# La mesure
-NU=`cat $URL_REF|wc -l`
+# on mesure NE echantillons
+NU=`cat $URL_PRIV_REF|wc -l`
echo "echantillons : $NE, URLs par echantillon = $NU"
boucle
#
Removed: _dev_/perf/svn_priv
--- _dev_/perf/svn_priv (original)
+++ _dev_/perf/svn_priv (removed)
@@ -1,66 +0,0 @@
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=1
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=13
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=14
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=15
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=16
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=20
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=21
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=22
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=24
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=25
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=26
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=27
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=29
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=30
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=31
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=32
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=34
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=35
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=36
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=38
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=39
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=4
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=40
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=41
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=45
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=47
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=48
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=52
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=53
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=54
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=55
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=56
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=57
-http://localhost:8888/svn/ecrire/?exec=articles?article=id_article=58
[... 271 lines stripped ...]