MCPcopy Index your code
hub / github.com/github/github-mcp-server / ProfileFunc

Function ProfileFunc

internal/profiler/profiler.go:193–198  ·  view source on GitHub ↗

ProfileFunc profiles a function using the global profiler

(ctx context.Context, operation string, fn func() error)

Source from the content-addressed store, hash-verified

191
192// ProfileFunc profiles a function using the global profiler
193func ProfileFunc(ctx context.Context, operation string, fn func() error) (*Profile, error) {
194 if globalProfiler == nil {
195 return nil, fn()
196 }
197 return globalProfiler.ProfileFunc(ctx, operation, fn)
198}
199
200// ProfileFuncWithMetrics profiles a function with metrics using the global profiler
201func ProfileFuncWithMetrics(ctx context.Context, operation string, fn func() (int, int64, error)) (*Profile, error) {

Callers

nothing calls this directly

Calls 1

ProfileFuncMethod · 0.80

Tested by

no test coverage detected