mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
mvcc: time restore in restore benchmark
This never worked.
This commit is contained in:
parent
a375ff172e
commit
c85f736522
@ -89,7 +89,8 @@ func benchmarkStoreRestore(revsPerKey int, b *testing.B) {
|
|||||||
var i fakeConsistentIndex
|
var i fakeConsistentIndex
|
||||||
be, tmpPath := backend.NewDefaultTmpBackend()
|
be, tmpPath := backend.NewDefaultTmpBackend()
|
||||||
s := NewStore(be, &lease.FakeLessor{}, &i)
|
s := NewStore(be, &lease.FakeLessor{}, &i)
|
||||||
defer cleanup(s, be, tmpPath)
|
// use closure to capture 's' to pick up the reassignment
|
||||||
|
defer func() { cleanup(s, be, tmpPath) }()
|
||||||
|
|
||||||
// arbitrary number of bytes
|
// arbitrary number of bytes
|
||||||
bytesN := 64
|
bytesN := 64
|
||||||
@ -103,7 +104,11 @@ func benchmarkStoreRestore(revsPerKey int, b *testing.B) {
|
|||||||
txn.End()
|
txn.End()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
s.Close()
|
||||||
|
|
||||||
|
b.ReportAllocs()
|
||||||
b.ResetTimer()
|
b.ResetTimer()
|
||||||
|
s = NewStore(be, &lease.FakeLessor{}, &i)
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkStoreRestoreRevs1(b *testing.B) {
|
func BenchmarkStoreRestoreRevs1(b *testing.B) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user