profiler

package
v3.11.19 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package profiler is for profilers

Index

Constants

This section is empty.

Variables

View Source
var DefaultProfiler = NewProfiler()

DefaultProfiler holds the default profiler

Functions

This section is empty.

Types

type Option

type Option func(o *Options)

Option func signature

func Name

func Name(n string) Option

Name of the profile

type Options

type Options struct {
	// Name to use for the profile
	Name string
}

Options holds the options for profiler

type Profiler

type Profiler interface {
	// Start the profiler
	Start() error
	// Stop the profiler
	Stop() error
	// Name of the profiler
	String() string
}

Profiler interface

func NewProfiler

func NewProfiler(_ ...Option) Profiler

NewProfiler returns new noop profiler

Directories

Path Synopsis
Package http enables the http profiler
Package http enables the http profiler
Package pprof provides a pprof profiler which writes output to /tmp/[name].{cpu,mem}.pprof
Package pprof provides a pprof profiler which writes output to /tmp/[name].{cpu,mem}.pprof

Jump to

Keyboard shortcuts

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