profiler

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 6 Imported by: 21

Documentation

Overview

Package profiler is a public API golang apps should use to send data to pyroscope server. It is intentionally separate from the rest of the code.

The idea is that this API won't change much over time, while all the other code will.

Index

Constants

This section is empty.

Variables

View Source
var (
	ProfileCPU          = spy.ProfileCPU
	ProfileAllocObjects = spy.ProfileAllocObjects
	ProfileAllocSpace   = spy.ProfileAllocSpace
	ProfileInuseObjects = spy.ProfileInuseObjects
	ProfileInuseSpace   = spy.ProfileInuseSpace
)

Functions

This section is empty.

Types

type Config

type Config struct {
	ApplicationName string // e.g backend.purchases
	ServerAddress   string // e.g http://pyroscope.services.internal:4040
	AuthToken       string // specify this token when using pyroscope cloud
	SampleRate      uint32
	Logger          agent.Logger
	ProfileTypes    []ProfileType
	DisableGCRuns   bool // this will disable automatic runtime.GC runs
}

type ProfileType added in v0.0.30

type ProfileType = spy.ProfileType

type Profiler

type Profiler struct {
	// contains filtered or unexported fields
}

func Start

func Start(cfg Config) (*Profiler, error)

Start starts continuously profiling go code

func (*Profiler) Stop

func (p *Profiler) Stop() error

Stop stops continious profiling session

Jump to

Keyboard shortcuts

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