MCPcopy
hub / github.com/grafana/tempo / measureRequest

Function measureRequest

pkg/cache/cache.go:52–58  ·  view source on GitHub ↗
(ctx context.Context, method string, col instr.Collector, toStatusCode func(error) string, f func(context.Context) error)

Source from the content-addressed store, hash-verified

50}
51
52func measureRequest(ctx context.Context, method string, col instr.Collector, toStatusCode func(error) string, f func(context.Context) error) error {
53 start := time.Now()
54 col.Before(ctx, method, start)
55 err := f(ctx)
56 col.After(ctx, method, toStatusCode(err), start)
57 return err
58}

Callers 5

FetchMethod · 0.85
FetchKeyMethod · 0.85
StoreMethod · 0.85
FetchMethod · 0.85
FetchKeyMethod · 0.85

Calls 2

fFunction · 0.85
NowMethod · 0.65

Tested by

no test coverage detected