| 1234567891011121314151617 |
- package storage
- import (
- "fmt"
- "testing"
- )
- func BenchmarkKVWatcherMemoryUsage(b *testing.B) {
- s := newWatchableStore(tmpPath)
- defer cleanup(s, tmpPath)
- b.ReportAllocs()
- b.StartTimer()
- for i := 0; i < b.N; i++ {
- s.Watcher([]byte(fmt.Sprint("foo", i)), false, 0, 0)
- }
- }
|