Commit 1fce1043 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0e74a2e1
......@@ -182,7 +182,9 @@ EOF
export WENDELIN_CORE_ZBLK_FMT=ZBlk1
# XXX 32 temp - raise
work=32 # array size generated (MB)
#work=32 # array size generated (MB)
work=64
#work=512 # array size generated (MB)
# generate data in data.fs
GENfs() {
......@@ -223,8 +225,8 @@ GENsql() {
# ---- main driver ----
GENfs
GENsqlite
GENsql
#GENsqlite
#GENsql
wait
sync
......
......@@ -69,26 +69,27 @@ func zsha1(ctx context.Context, url string, useprefetch bool) (err error) {
}
// prefetchBlk prefetches block of 512 objects starting from xid
var tprevLoadBlkStart time.Time
//var tprevLoadBlkStart time.Time
prefetchBlk := func(ctx context.Context, xid zodb.Xid) {
if cache == nil {
return
}
t1 := time.Now()
for i := 0; i < 512; i++ {
//t1 := time.Now()
//for i := 0; i < 512; i++ {
for i := 0; i < 8; i++ {
prefetch(ctx, xid)
xid.Oid++
}
t2 := time.Now()
δt := t2.Sub(t1)
fmt.Printf("tprefetch: %s", δt)
if !tprevLoadBlkStart.IsZero() {
fmt.Printf("\ttprevload: %s", t1.Sub(tprevLoadBlkStart))
}
fmt.Printf("\n")
tprevLoadBlkStart = t2
//t2 := time.Now()
//δt := t2.Sub(t1)
//fmt.Printf("tprefetch: %s", δt)
//if !tprevLoadBlkStart.IsZero() {
// fmt.Printf("\ttprevload: %s", t1.Sub(tprevLoadBlkStart))
//}
//fmt.Printf("\n")
//
//tprevLoadBlkStart = t2
}
......@@ -99,8 +100,8 @@ func zsha1(ctx context.Context, url string, useprefetch bool) (err error) {
}
before := lastTid + 1 // XXX overflow ?
if false {
defer profile.Start().Stop()
if true {
defer profile.Start(profile.TraceProfile).Stop()
}
tstart := time.Now()
......@@ -111,7 +112,8 @@ func zsha1(ctx context.Context, url string, useprefetch bool) (err error) {
loop:
for {
xid := zodb.Xid{Oid: oid, XTid: zodb.XTid{Tid: before, TidBefore: true}}
if xid.Oid % 512 == 0 {
//if xid.Oid % 512 == 0 {
if xid.Oid % 8 == 0 {
prefetchBlk(ctx, xid)
}
data, _, err := load(ctx, xid)
......
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