diagnostics

package
v2.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2022 License: Apache-2.0, BSD-3-Clause, MIT Imports: 9 Imported by: 0

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

func UploadHeapProfile(ctx context.Context, dest string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL