mirror of https://github.com/ledisdb/ledisdb.git
bugfix ledis-dbbench
This commit is contained in:
parent
6572f3c719
commit
a2c98cf359
|
@ -105,9 +105,12 @@ func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
cfg := config.NewConfigDefault()
|
cfg := config.NewConfigDefault()
|
||||||
cfg.DBPath = "./var/db_test"
|
cfg.DataDir = "./var/ledis_dbbench"
|
||||||
cfg.DBName = *name
|
cfg.DBName = *name
|
||||||
os.RemoveAll(cfg.DBPath)
|
os.RemoveAll(cfg.DBPath)
|
||||||
|
defer os.RemoveAll(cfg.DBPath)
|
||||||
|
|
||||||
|
os.MkdirAll(cfg.DBPath, 0755)
|
||||||
|
|
||||||
cfg.LevelDB.BlockSize = 32 * KB
|
cfg.LevelDB.BlockSize = 32 * KB
|
||||||
cfg.LevelDB.CacheSize = 512 * MB
|
cfg.LevelDB.CacheSize = 512 * MB
|
||||||
|
@ -119,7 +122,7 @@ func main() {
|
||||||
var err error
|
var err error
|
||||||
ldb, err = ledis.Open(cfg)
|
ldb, err = ledis.Open(cfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
println(err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue