config

package
v0.0.0-...-869124a Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentConfig

type ComponentConfig struct {
	Name       string
	Namespace  string
	Deployment string
	Port       int
}

ComponentConfig defines a component to profile

type Config

type Config struct {
	// Collection interval
	Interval time.Duration

	// CPU profiling duration
	CPUDuration time.Duration

	// Profile mode: both, heap, cpu
	Mode string

	// Output directory
	OutputDir string

	// Test target (make target)
	TestTarget string

	// Profile name
	Name string

	// Components to profile
	Components []ComponentConfig
}

Config holds all configuration for profiling

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns configuration with defaults from environment

func (*Config) CollectCPU

func (c *Config) CollectCPU() bool

CollectCPU returns whether to collect CPU profiles

func (*Config) CollectHeap

func (c *Config) CollectHeap() bool

CollectHeap returns whether to collect heap profiles

func (*Config) ComponentDir

func (c *Config) ComponentDir(component string) string

ComponentDir returns the directory for a specific component

func (*Config) PIDFile

func (c *Config) PIDFile() string

PIDFile returns the path to the PID file

func (*Config) ProfileDir

func (c *Config) ProfileDir() string

ProfileDir returns the full path to the profile directory

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the configuration is valid

Jump to

Keyboard shortcuts

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