(b *testing.B)
| 113 | } |
| 114 | |
| 115 | func BenchmarkReflectorResyncChanMany(b *testing.B) { |
| 116 | s := NewStore(MetaNamespaceKeyFunc) |
| 117 | g := NewReflector(&testLW{}, &v1.Pod{}, s, 25*time.Millisecond) |
| 118 | // The improvement to this (calling the timer's Stop() method) makes |
| 119 | // this benchmark about 40% faster. |
| 120 | for i := 0; i < b.N; i++ { |
| 121 | g.resyncPeriod = time.Duration(rand.Float64() * float64(time.Millisecond) * 25) |
| 122 | _, stop := g.resyncChan() |
| 123 | stop() |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | func TestReflectorWatchHandlerError(t *testing.T) { |
| 128 | s := NewStore(MetaNamespaceKeyFunc) |
nothing calls this directly
no test coverage detected