(b *testing.B)
| 153 | } |
| 154 | |
| 155 | func BenchmarkContextWatcherUncancellable(b *testing.B) { |
| 156 | cw := ctxwatch.NewContextWatcher(&testHandler{handleCancel: func(context.Context) {}, handleUnwatchAfterCancel: func() {}}) |
| 157 | |
| 158 | for b.Loop() { |
| 159 | cw.Watch(context.Background()) |
| 160 | cw.Unwatch() |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | func BenchmarkContextWatcherCancelled(b *testing.B) { |
| 165 | cw := ctxwatch.NewContextWatcher(&testHandler{handleCancel: func(context.Context) {}, handleUnwatchAfterCancel: func() {}}) |
nothing calls this directly
no test coverage detected