ProfileFuncWithMetrics profiles a function with metrics using the global profiler
(ctx context.Context, operation string, fn func() (int, int64, error))
| 199 | |
| 200 | // ProfileFuncWithMetrics profiles a function with metrics using the global profiler |
| 201 | func ProfileFuncWithMetrics(ctx context.Context, operation string, fn func() (int, int64, error)) (*Profile, error) { |
| 202 | if globalProfiler == nil { |
| 203 | _, _, err := fn() |
| 204 | return nil, err |
| 205 | } |
| 206 | return globalProfiler.ProfileFuncWithMetrics(ctx, operation, fn) |
| 207 | } |
| 208 | |
| 209 | // Start begins timing using the global profiler |
| 210 | func Start(ctx context.Context, operation string) func(int, int64) *Profile { |
nothing calls this directly
no test coverage detected