profiler

package
v1.4.9 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: BSD-3-Clause Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Dir         string
	Enabled     bool
	Freq        time.Duration
	MaxNumFiles int
}

Config that is used to describe the options of the continuous profiler.

type ContinuousProfiler

type ContinuousProfiler interface {
	Dispatch() error
	Shutdown()
}

ContinuousProfiler periodically captures CPU, memory, and lock profiles

func NewContinuous

func NewContinuous(dir string, freq time.Duration, maxNumFiles int) ContinuousProfiler

type Profiler

type Profiler interface {
	// StartCPUProfiler starts measuring the cpu utilization of this process
	StartCPUProfiler() error

	// StopCPUProfiler stops measuring the cpu utilization of this process
	StopCPUProfiler() error

	// MemoryProfile dumps the current memory utilization of this process
	MemoryProfile() error

	// LockProfile dumps the current lock statistics of this process
	LockProfile() error
}

Profiler provides helper methods for measuring the current performance of this process

func New

func New(dir string) Profiler

Jump to

Keyboard shortcuts

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