profilers

package
v0.1.2-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

+kubebuilder:validation:Optional

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultPath is the default path that is used to store profiles.
	DefaultPath = path.Join(config.DefaultLogDirectory, "profiles")
	// DefaultPathFlag is the default path flag for the profiler.
	DefaultPathFlag = defaultKey + ".profiles_path"
)

Functions

func Module

func Module() fx.Option

Module is a fx module that provides the profilers.

Types

type Constructor

type Constructor struct {
	Key           string
	PathKey       string
	DefaultConfig ProfilersConfig
}

Constructor holds fields to create an instance of profilers.

type ProfilersConfig

type ProfilersConfig struct {
	// Register routes. Profile types profile, symbol and cmdline will be registered at /debug/pprof/{profile,symbol,cmdline}.
	RegisterHTTPRoutes bool `json:"register_http_routes" default:"true"`
	// Path to save performance profiles. This can be set via command line arguments as well. E.g. default path for aperture-agent is /var/log/aperture/aperture-agent/profiles.
	ProfilesPath string `json:"profiles_path"`
	// Flag to enable cpu profiling on process start and save it to a file. HTTP interface will not work if this is enabled as CPU profile will always be running.
	CPUProfile bool `json:"cpu_profiler" default:"false"`
}

ProfilersConfig holds configuration for profilers. swagger:model +kubebuilder:object:generate=true

func (*ProfilersConfig) DeepCopy added in v0.1.2

func (in *ProfilersConfig) DeepCopy() *ProfilersConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfilersConfig.

func (*ProfilersConfig) DeepCopyInto added in v0.1.2

func (in *ProfilersConfig) DeepCopyInto(out *ProfilersConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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