Documentation ¶
Overview ¶
Package profiler offers functions to profile the execution of a process using go's built-in profiling tools
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { CPU CPUConfig Memory MemoryConfig Metrics MetricsConfig Trace TraceConfig }
Config is the configuration of the profiler
type MemoryConfig ¶
MemoryConfig defines the configuration of a Memory profiling probe
type MetricsConfig ¶
MetricsConfig defines the configuration of a metrics probe
type Probe ¶
Probe defines the interface for controlling a profiling probe
func NewCPUProbe ¶
NewCPUProbe creates a new CPU profiling probe
func NewMemoryProbe ¶
func NewMemoryProbe(config MemoryConfig) (Probe, error)
NewMemoryProbe creates a memory profiling probe with the given configuration
func NewMetricsProbe ¶
func NewMetricsProbe(config MetricsConfig) (Probe, error)
NewMetricsProbe creates a metrics profiling probe with the given configuration
func NewTraceProbe ¶
func NewTraceProbe(config TraceConfig) (Probe, error)
NewTraceProbe creates a trace profiling probe with the given configuration
type Profiler ¶
type Profiler interface { // Start stars the collection of profiling information with the given configuration Start(ctx context.Context, config Config) (io.Closer, error) }
Profiler defines the methods to control execution profiling
type TraceConfig ¶
TraceConfig defines the configuration of a tracing probe