Commit fd774a65 authored by Kirill Smelkov's avatar Kirill Smelkov

.

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