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:
Brian Gitonga Marete 2014-02-12 00:39:10 +03:00
parent eabeac6616
commit b6e862af7b
1 changed files with 3 additions and 1 deletions

View File

@ -47,6 +47,7 @@ import (
"strconv"
"strings"
"sync"
"time"
"camlistore.org/pkg/blob"
"camlistore.org/pkg/blobserver"
@ -596,11 +597,12 @@ func newFromConfig(ld blobserver.Loader, config jsonconfig.Obj) (bs blobserver.S
return nil, err
}
start := time.Now()
log.Printf("Reading encryption metadata...")
if err := sto.readAllMetaBlobs(); err != nil {
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
}