diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-05-12 15:36:10 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-05-12 15:36:10 -0600 |
commit | 417b0b7bf69569597e126fcf920176942dcf427a (patch) | |
tree | a836c25d539da0f0290742c13d105d72fb30f579 /cmd/bolt/bench.go | |
parent | Merge pull request #160 from benbjohnson/fix-deletion (diff) | |
parent | Add -work flag to 'bolt bench'. (diff) | |
download | dedo-417b0b7bf69569597e126fcf920176942dcf427a.tar.gz dedo-417b0b7bf69569597e126fcf920176942dcf427a.tar.xz |
Merge pull request #161 from benbjohnson/work
Add -work flag to 'bolt bench'.
Diffstat (limited to 'cmd/bolt/bench.go')
-rw-r--r-- | cmd/bolt/bench.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/bolt/bench.go b/cmd/bolt/bench.go index fef8e54..e8bf376 100644 --- a/cmd/bolt/bench.go +++ b/cmd/bolt/bench.go @@ -33,7 +33,12 @@ func Bench(options *BenchOptions) { // Find temporary location. path := tempfile() - defer os.Remove(path) + + if options.Clean { + defer os.Remove(path) + } else { + println("work:", path) + } // Create database. db, err := bolt.Open(path, 0600) @@ -275,6 +280,7 @@ type BenchOptions struct { MemProfile string BlockProfile string StatsInterval time.Duration + Clean bool } // BenchResults represents the performance results of the benchmark. |