MCPcopy Index your code
hub / github.com/jetify-com/devbox / FunctionTimer

Function FunctionTimer

internal/debug/time.go:36–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34}
35
36func FunctionTimer() *timer {
37 if !timerEnabled {
38 return nil
39 }
40 pc := make([]uintptr, 15)
41 n := runtime.Callers(2, pc)
42 frames := runtime.CallersFrames(pc[:n])
43 frame, _ := frames.Next()
44 parts := strings.Split(frame.Function, ".")
45 return Timer(parts[len(parts)-1])
46}
47
48func (t *timer) End() {
49 if t == nil {

Callers 15

PrintDevEnvMethod · 0.92
StorePathsAreInStoreFunction · 0.92
BuildFunction · 0.92
ProfileInstallFunction · 0.92
ProfileRemoveFunction · 0.92
ProfileListItemsFunction · 0.92
GetOutputsWithCacheMethod · 0.92
FillNarInfoCacheFunction · 0.92
WriteScriptsToFilesFunction · 0.92
collectLockfilesFunction · 0.92

Calls 1

TimerFunction · 0.85

Tested by

no test coverage detected