Commit fd774a65 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 851864a9
......@@ -77,7 +77,7 @@ Sgo() {
# -cpuprofile cpu.out
# -trace trace.out
exec -a Sgo \
neo -cpuprofile cpu.out -log_dir=$log storage -cluster=$cluster -bind=$Sbind -masters=$Mbind "$@" &
neo -log_dir=$log storage -cluster=$cluster -bind=$Sbind -masters=$Mbind "$@" &
}
......@@ -268,24 +268,47 @@ GENsql
wait
sync
# build go client
# (we run it several times and in parallel - for go build not to infere with benchmarking)
go build -o zhash_go zhash.go
# run benchmarks
N=`seq 1` # XXX repeat benchmarks N time
#hashfunc=sha1
#hashfunc=adler32
#hashfunc=crc32
hashfunc=null
Npar=8 # run so many parallel clients in parallel phase
# runpar ... - run several program instances in parallel
runpar() {
local jobv
for i in `seq $Npar`; do
"$@" &
jobv="$jobv $!"
done
wait $jobv
}
# time1 <url> - run benchmarks on the URL once
bench1() {
url=$1
# time demo-zbigarray read $url
# ./zhash.py --$hashfunc $url
# echo -e "\n# ${Npar} clients in parallel"
# runpar ./zhash.py --$hashfunc $url
if [[ $url == zeo://* ]]; then
echo "(skipping zhash.go on ZEO -- Cgo does not support zeo:// protocol)"
return
fi
go run zhash.go --log_dir=$log -$hashfunc $url
# go run zhash.go --log_dir=$log -$hashfunc -useprefetch $url
echo
./zhash_go --log_dir=$log -$hashfunc $url
# ./zhash_go --log_dir=$log -$hashfunc -useprefetch $url
# echo -e "\n# ${Npar} clients in parallel"
# runpar ./zhash_go --log_dir=$log -$hashfunc $url
}
# echo -e "\n*** FileStorage"
......
......@@ -162,7 +162,7 @@ func zhash(ctx context.Context, url string, h hasher, useprefetch bool) (err err
//defer profile.Start(profile.CPUProfile).Stop()
}
for qqq := 0; qqq < 10; qqq++ {
for qqq := 0; qqq < 2; qqq++ {
tstart := time.Now()
h.Reset() // XXX temp
......
......@@ -103,7 +103,7 @@ def main():
last_tid = stor.lastTransaction()
before = p64(u64(last_tid) + 1)
for zzz in range(10):
for zzz in range(2):
tstart = time()
# vvv h.reset() XXX temp
......
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