Commit cc7bb3c1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 12778330
......@@ -270,7 +270,7 @@ sync
# run benchmarks
N=`seq 2` # XXX repeat benchmarks N time
N=`seq 1` # XXX repeat benchmarks N time
#hashfunc=sha1
#hashfunc=adler32
hashfunc=null
......@@ -279,7 +279,7 @@ hashfunc=null
bench1() {
url=$1
# time demo-zbigarray read $url
./zhash.py --$hashfunc $url
# ./zhash.py --$hashfunc $url
if [[ $url == zeo://* ]]; then
echo "(skipping zhash.go on ZEO -- Cgo does not support zeo:// protocol)"
return
......
......@@ -156,13 +156,13 @@ func zhash(ctx context.Context, url string, h hasher, useprefetch bool) (err err
}
before := lastTid + 1 // XXX overflow ?
if false {
if true {
//defer profile.Start(profile.TraceProfile).Stop()
//defer profile.Start(profile.MemProfile).Stop()
defer profile.Start(profile.CPUProfile).Stop()
}
for qqq := 0; qqq < 10; qqq++ {
for qqq := 0; qqq < 30; qqq++ {
tstart := time.Now()
h.Reset() // XXX temp
......@@ -203,8 +203,10 @@ loop:
if useprefetch {
x += " +prefetch"
}
if false {
fmt.Printf("%s:%x ; oid=0..%d nread=%d t=%s (%s / object) x=%s\n",
h.name, h.Sum(nil), oid-1, nread, δt, δt / time.Duration(oid), x) // XXX /oid cast ?
}
}
return nil
......
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