Commit 6319a25e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8a4daf80
...@@ -171,12 +171,14 @@ init_fs() { ...@@ -171,12 +171,14 @@ init_fs() {
dataset= # name of current dataset dataset= # name of current dataset
dataset_size= # size parameter for current dataset dataset_size= # size parameter for current dataset
ds= # top-level dir of current dataset ds= # top-level dir of current dataset
neocluster= # NEO cluster name (different for different datasets to avoid confustion)
# switch_dataset <name> <size> - switch benchmarking dataset to named with size # switch_dataset <name> <size> - switch benchmarking dataset to named with size
switch_dataset() { switch_dataset() {
dataset=$1 dataset=$1
dataset_size=$2 dataset_size=$2
ds=`echo $dataset $dataset_size |tr ' ' '-'` # wczblk1 8 -> wczblk1-8 ds=`echo $dataset $dataset_size |tr ' ' '-'` # wczblk1 8 -> wczblk1-8
neocluster=pygotest-$ds
echo -e "\ndataset:\t$ds" echo -e "\ndataset:\t$ds"
ds=$var/$ds ds=$var/$ds
...@@ -185,10 +187,8 @@ switch_dataset() { ...@@ -185,10 +187,8 @@ switch_dataset() {
neosql=$ds/neo.sql; mkdir -p $neosql # NEO/py: mariadb neosql=$ds/neo.sql; mkdir -p $neosql # NEO/py: mariadb
mycnf=$neosql/mariadb.cnf # NEO/py: mariadb config mycnf=$neosql/mariadb.cnf # NEO/py: mariadb config
mysock=$(realpath $neosql)/my.sock # NEO/py: mariadb socket mysock=$(realpath $neosql)/my.sock # NEO/py: mariadb socket
}
# NEO cluster name }
cluster=pygotest
# control started NEO cluster # control started NEO cluster
xneoctl() { xneoctl() {
...@@ -221,12 +221,12 @@ kill $j' EXIT ...@@ -221,12 +221,12 @@ kill $j' EXIT
Mpy() { Mpy() {
# --autostart=1 # --autostart=1
exec -a Mpy \ exec -a Mpy \
neomaster --cluster=$cluster --bind=$Mbind --masters=$Mbind -r 1 -p 1 --logfile=$log/Mpy.log "$@" & neomaster --cluster=$neocluster --bind=$Mbind --masters=$Mbind -r 1 -p 1 --logfile=$log/Mpy.log "$@" &
} }
Mgo() { Mgo() {
exec -a Mgo \ exec -a Mgo \
neo --log_dir=$log master -cluster=$cluster -bind=$Mbind "$@" & neo --log_dir=$log master -cluster=$neocluster -bind=$Mbind "$@" &
} }
# Spy ... - spawn NEO/py storage # Spy ... - spawn NEO/py storage
...@@ -235,7 +235,7 @@ Spy() { ...@@ -235,7 +235,7 @@ Spy() {
# --database=... # --database=...
# --engine=... # --engine=...
exec -a Spy \ exec -a Spy \
neostorage --cluster=$cluster --bind=$Sbind --masters=$Mbind --logfile=$log/Spy.log "$@" & neostorage --cluster=$neocluster --bind=$Sbind --masters=$Mbind --logfile=$log/Spy.log "$@" &
} }
# Sgo <data.fs> - spawn NEO/go storage # Sgo <data.fs> - spawn NEO/go storage
...@@ -244,13 +244,13 @@ Sgo() { ...@@ -244,13 +244,13 @@ Sgo() {
# -cpuprofile cpu.out # -cpuprofile cpu.out
# -trace trace.out # -trace trace.out
exec -a Sgo \ exec -a Sgo \
neo -log_dir=$log storage -cluster=$cluster -bind=$Sbind -masters=$Mbind "$@" & neo -log_dir=$log storage -cluster=$neocluster -bind=$Sbind -masters=$Mbind "$@" &
} }
# Apy ... - spawn NEO/py admin # Apy ... - spawn NEO/py admin
Apy() { Apy() {
exec -a Apy \ exec -a Apy \
neoadmin --cluster=$cluster --bind=$Abind --masters=$Mbind --logfile=$log/Apy.log "$@" & neoadmin --cluster=$neocluster --bind=$Abind --masters=$Mbind --logfile=$log/Apy.log "$@" &
} }
# Zpy <data.fs> ... - spawn ZEO # Zpy <data.fs> ... - spawn ZEO
...@@ -389,7 +389,7 @@ GENsqlite() { ...@@ -389,7 +389,7 @@ GENsqlite() {
test -e $ds/generated.sqlite && return test -e $ds/generated.sqlite && return
echo -e '\n*** generating sqlite data...' echo -e '\n*** generating sqlite data...'
NEOpylite NEOpylite
${dataset}_gen_data neo://$cluster@$Mbind $dataset_size ${dataset}_gen_data neo://$neocluster@$Mbind $dataset_size
xneoctl set cluster stopping xneoctl set cluster stopping
wait # XXX fragile - won't work if there are children spawned outside wait # XXX fragile - won't work if there are children spawned outside
sync sync
...@@ -401,7 +401,7 @@ GENsql() { ...@@ -401,7 +401,7 @@ GENsql() {
test -e $ds/generated.sql && return test -e $ds/generated.sql && return
echo -e '\n*** generating sql data...' echo -e '\n*** generating sql data...'
NEOpysql NEOpysql
${dataset}_gen_data neo://$cluster@$Mbind $dataset_size ${dataset}_gen_data neo://$neocluster@$Mbind $dataset_size
xneoctl set cluster stopping xneoctl set cluster stopping
sleep 1 # XXX fragile sleep 1 # XXX fragile
xmysql -e "SHUTDOWN" xmysql -e "SHUTDOWN"
...@@ -877,26 +877,26 @@ zbench_local() { ...@@ -877,26 +877,26 @@ zbench_local() {
echo -e "\n*** NEO/py sqlite" echo -e "\n*** NEO/py sqlite"
NEOpylite NEOpylite
zbench neo://$cluster@$Mbind `hostname`/neo/py/sqlite $zhashok zbench neo://$neocluster@$Mbind `hostname`/neo/py/sqlite $zhashok
xneoctl set cluster stopping xneoctl set cluster stopping
wait wait
echo -e "\n*** NEO/py sql" echo -e "\n*** NEO/py sql"
NEOpysql NEOpysql
zbench neo://$cluster@$Mbind `hostname`/neo/py/sql $zhashok zbench neo://$neocluster@$Mbind `hostname`/neo/py/sql $zhashok
xneoctl set cluster stopping xneoctl set cluster stopping
xmysql -e "SHUTDOWN" xmysql -e "SHUTDOWN"
wait wait
echo -e "\n*** NEO/go" echo -e "\n*** NEO/go"
NEOgo NEOgo
zbench neo://$cluster@$Mbind `hostname`/neo/go $zhashok zbench neo://$neocluster@$Mbind `hostname`/neo/go $zhashok
xneoctl set cluster stopping xneoctl set cluster stopping
wait wait
echo -e "\n*** NEO/go (sha1 disabled)" echo -e "\n*** NEO/go (sha1 disabled)"
X_NEOGO_SHA1_SKIP=y NEOgo X_NEOGO_SHA1_SKIP=y NEOgo
X_NEOGO_SHA1_SKIP=y zbench_go neo://$cluster@$Mbind "`hostname`/neo/go(!sha1)" $zhashok X_NEOGO_SHA1_SKIP=y zbench_go neo://$neocluster@$Mbind "`hostname`/neo/go(!sha1)" $zhashok
xneoctl set cluster stopping xneoctl set cluster stopping
wait wait
} }
...@@ -1047,7 +1047,7 @@ zbench_cluster() { ...@@ -1047,7 +1047,7 @@ zbench_cluster() {
echo -e "\n*** NEO/go (sha1 disabled)" echo -e "\n*** NEO/go (sha1 disabled)"
X_NEOGO_SHA1_SKIP=y NEOgo X_NEOGO_SHA1_SKIP=y NEOgo
on $url X_NEOGO_SHA1_SKIP=y ./neotest run-client --goonly neo://$cluster@$Mbind "\\\"`hostname`-$peer/neo/go(!sha1)\\\"" $zhashok on $url X_NEOGO_SHA1_SKIP=y ./neotest run-client --goonly neo://$neocluster@$Mbind "\\\"`hostname`-$peer/neo/go(!sha1)\\\"" $zhashok
xneoctl set cluster stopping xneoctl set cluster stopping
wait wait
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment