aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-05-28 12:50:46 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-05-28 12:50:48 -0600
commit754966bea08146857dea0d9de05e95a4fc7947e8 (patch)
tree3d101d4e29771c1d19ccd4afec63821c5fce18ec /cmd
parentAdd streaming check. (diff)
downloaddedo-754966bea08146857dea0d9de05e95a4fc7947e8.tar.gz
dedo-754966bea08146857dea0d9de05e95a4fc7947e8.tar.xz
Optimize Tx.Check().
This commit removes several memory allocations occurring on every page and also caches the freelist map used when iterating over the pages. This results in significantly better performance.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bolt/check.go2
-rw-r--r--cmd/bolt/main.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/cmd/bolt/check.go b/cmd/bolt/check.go
index 1466fd7..7555ec8 100644
--- a/cmd/bolt/check.go
+++ b/cmd/bolt/check.go
@@ -38,7 +38,7 @@ func Check(path string) {
// Print summary of errors.
if count > 0 {
- fatalf("%d errors found")
+ fatalf("%d errors found", count)
} else {
println("OK")
}
diff --git a/cmd/bolt/main.go b/cmd/bolt/main.go
index 44ba5a1..a79302d 100644
--- a/cmd/bolt/main.go
+++ b/cmd/bolt/main.go
@@ -10,11 +10,13 @@ import (
"github.com/boltdb/bolt"
"github.com/codegangsta/cli"
+ // "github.com/davecheney/profile"
)
var branch, commit string
func main() {
+ // defer profile.Start(&profile.Config{CPUProfile: true, MemProfile: true}).Stop()
log.SetFlags(0)
NewApp().Run(os.Args)
}