contrib/tools: support structured logger

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee
2018-04-16 04:00:38 -07:00
parent 6dbce6b9a4
commit 9063805180
3 changed files with 13 additions and 6 deletions

View File

@@ -18,6 +18,8 @@ import (
"os"
"time"
"go.uber.org/zap"
"github.com/coreos/etcd/lease"
"github.com/coreos/etcd/mvcc"
"github.com/coreos/etcd/mvcc/backend"
@@ -36,7 +38,7 @@ func initMVCC() {
bcfg := backend.DefaultBackendConfig()
bcfg.Path, bcfg.BatchInterval, bcfg.BatchLimit = "mvcc-bench", time.Duration(batchInterval)*time.Millisecond, batchLimit
be := backend.New(bcfg)
s = mvcc.NewStore(be, &lease.FakeLessor{}, nil)
s = mvcc.NewStore(zap.NewExample(), be, &lease.FakeLessor{}, nil)
os.Remove("mvcc-bench") // boltDB has an opened fd, so removing the file is ok
}