Documentation ¶
Overview ¶
Package diagnostics is a beam internal package that contains code for writing and uploading diagnostic info (e.g. heap profiles) about the worker process. This package is not intended for end user use and can change at any time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SampleForHeapProfile ¶
func SampleForHeapProfile(ctx context.Context, samplingFrequencySeconds, maxTimeBetweenDumpsSeconds int)
SampleForHeapProfile checks every second if it should take a heap profile, and if so it takes one and saves it to hProfLoc. A profile will be taken if either: (1) the amount of memory allocated has increased since the last heap profile was taken or (2) it has been 60 seconds since the last heap profile was taken
func UploadHeapProfile ¶
UploadHeapProfile checks if a heap profile is available and, if so, uploads it to dest. It will first check hProfLoc for the heap profile and then it will check tempHProfLoc if no file exists at hProfLoc.
To examine, download the file and run: `go tool pprof -http=:8082 path/to/profile`
Types ¶
This section is empty.