mirror of https://github.com/perkeep/perkeep.git
pkg/blobserver/encrypt: Log time it takes to read encryption metadata.
We'll use this later on to see the effect of using blob streaming rather than enumeration. In particular, we will be looking for a significant speed-up with diskpacked when metadata processing uses streaming rather than enumeration. Change-Id: I8295d05d74a84518844237bc48d4f11db8ea14b0
This commit is contained in:
parent
eabeac6616
commit
b6e862af7b
|
@ -47,6 +47,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
"camlistore.org/pkg/blob"
|
"camlistore.org/pkg/blob"
|
||||||
"camlistore.org/pkg/blobserver"
|
"camlistore.org/pkg/blobserver"
|
||||||
|
@ -596,11 +597,12 @@ func newFromConfig(ld blobserver.Loader, config jsonconfig.Obj) (bs blobserver.S
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
start := time.Now()
|
||||||
log.Printf("Reading encryption metadata...")
|
log.Printf("Reading encryption metadata...")
|
||||||
if err := sto.readAllMetaBlobs(); err != nil {
|
if err := sto.readAllMetaBlobs(); err != nil {
|
||||||
return nil, fmt.Errorf("Error scanning metadata on start-up: %v", err)
|
return nil, fmt.Errorf("Error scanning metadata on start-up: %v", err)
|
||||||
}
|
}
|
||||||
log.Printf("Read all encryption metadata.")
|
log.Printf("Read all encryption metadata in %.3f seconds", time.Since(start).Seconds())
|
||||||
|
|
||||||
return sto, nil
|
return sto, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue