timedQuery Wraps the execution of the function with a recorded timed snapshot
(recorder *QueryRecorder, name string, ns string, fn func() (time.Duration, error))
| 208 | |
| 209 | // timedQuery Wraps the execution of the function with a recorded timed snapshot |
| 210 | func timedQuery(recorder *QueryRecorder, name string, ns string, fn func() (time.Duration, error)) { |
| 211 | duration, fnErr := fn() |
| 212 | recorder.RecordQuery(name, ns, duration, fnErr) |
| 213 | } |
| 214 | |
| 215 | func sliceContains(set []string, val string) bool { |
| 216 | for _, v := range set { |
no test coverage detected