View definition

func CaptureDebugGCStatsOnce

Defined in


Capture new values for the Go garbage collector statistics exported in debug.GCStats. This is designed to be called in a background goroutine. Giving a registry which has not been given to RegisterDebugGCStats will panic.

Be careful (but much less so) with this because debug.ReadGCStats calls the C function runtime·lock(runtime·mheap) which, while not a stop-the-world operation, isn't something you want to be doing all the time.

CaptureDebugGCStatsOnce is referenced in 2 repositories