profiler

package
v0.28.16 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: AGPL-3.0 Imports: 20 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 AutoProfiler

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

func New

func New(log zerolog.Logger, uploader Uploader, dir string, interval time.Duration, duration time.Duration, enabled bool) (*AutoProfiler, error)

New creates a new AutoProfiler instance performing profiling every interval for duration.

func (*AutoProfiler) Done

func (p *AutoProfiler) Done() <-chan struct{}

func (*AutoProfiler) Enabled added in v0.28.13

func (p *AutoProfiler) Enabled() bool

Enabled returns the current enabled state of the profiler.

func (*AutoProfiler) Ready

func (p *AutoProfiler) Ready() <-chan struct{}

func (*AutoProfiler) SetEnabled added in v0.28.13

func (p *AutoProfiler) SetEnabled(enabled bool) error

SetEnabled sets whether the profiler is active. No errors are expected during normal operation.

type NoopUploader added in v0.27.1

type NoopUploader struct{}

func (*NoopUploader) Upload added in v0.27.1

func (u *NoopUploader) Upload(ctx context.Context, filename string, pt pb.ProfileType) error

type Params added in v0.27.1

type Params struct {
	ProjectID string
	ChainID   string
	Role      string
	Version   string
	Commit    string
	Instance  string
}

type Uploader added in v0.27.1

type Uploader interface {
	Upload(ctx context.Context, filename string, pt pb.ProfileType) error
}

func NewUploader added in v0.27.1

func NewUploader(log zerolog.Logger, params Params, opts ...option.ClientOption) (Uploader, error)

type UploaderImpl added in v0.27.1

type UploaderImpl struct {
	ProjectId  string
	Deployment *pb.Deployment
	// contains filtered or unexported fields
}

func (*UploaderImpl) Upload added in v0.27.1

func (u *UploaderImpl) Upload(ctx context.Context, filename string, pt pb.ProfileType) error

Jump to

Keyboard shortcuts

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