MCPcopy
hub / github.com/vmware-tanzu/sonobuoy / timedQuery

Function timedQuery

pkg/discovery/query.go:210–213  ·  view source on GitHub ↗

timedQuery Wraps the execution of the function with a recorded timed snapshot

(recorder *QueryRecorder, name string, ns string, fn func() (time.Duration, error))

Source from the content-addressed store, hash-verified

208
209// timedQuery Wraps the execution of the function with a recorded timed snapshot
210func 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
215func sliceContains(set []string, val string) bool {
216 for _, v := range set {

Callers 3

QueryResourcesFunction · 0.85
queryServerVersionFunction · 0.85
queryServerGroupsFunction · 0.85

Calls 1

RecordQueryMethod · 0.80

Tested by

no test coverage detected