Documentation ¶
Index ¶
- Constants
- type ExtensionConfig
- type HTTPSamplingConfig
- type NetworkConfig
- type NetworkDataCollectingSettings
- type NetworkSamplingRule
- type OnCPUConfig
- type ProfileTaskRunner
- type ProfilingRunningSuccessNotify
- type ProfilingTask
- type ProtocolAnalyzeConfig
- type Runner
- type SamplingConfig
- type TargetType
- type TaskConfig
- type TriggerType
Constants ¶
View Source
const MissingSymbol = "[MISSING]"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtensionConfig ¶ added in v0.4.0
type ExtensionConfig struct {
NetworkSamplings []*NetworkSamplingRule `json:"NetworkSamplings"`
}
type HTTPSamplingConfig ¶ added in v0.4.0
type NetworkConfig ¶ added in v0.4.0
type NetworkConfig struct { ReportInterval string `mapstructure:"report_interval"` // The duration of data report interval MeterPrefix string `mapstructure:"meter_prefix"` // The prefix of meter name ProtocolAnalyze ProtocolAnalyzeConfig `mapstructure:"protocol_analyze"` // The 7-Layer protocol analyze }
type NetworkDataCollectingSettings ¶ added in v0.4.0
type NetworkSamplingRule ¶ added in v0.4.0
type NetworkSamplingRule struct { URIRegex *string `json:"URIRegex"` MinDuration *int32 `json:"MinDuration"` When4XX bool `json:"When4xx"` When5XX bool `json:"When5xx"` Settings *NetworkDataCollectingSettings `json:"Settings"` }
type OnCPUConfig ¶
type OnCPUConfig struct {
Period string `mapstructure:"dump_period"` // The duration of dump stack
}
type ProfileTaskRunner ¶
type ProfileTaskRunner interface { // Init runner with profiling task and process Init(task *ProfilingTask, processes []api.ProcessInterface) error // Run profiling, if throw error or method finish means the profiling task finished Run(ctx context.Context, notify ProfilingRunningSuccessNotify) error // Stop the runner initiative, is typically used to specify the profiling duration Stop() error // FlushData means dump the exists profiling data and flush them to the backend protocol format FlushData() ([]*v3.EBPFProfilingData, error) }
ProfileTaskRunner is use to running different type of profiling task, such as on-cpu profiling task
type ProfilingRunningSuccessNotify ¶
type ProfilingRunningSuccessNotify func()
type ProfilingTask ¶
type ProfilingTask struct { // TaskID of profiling task TaskID string // ProcessIDList of need to monitoring process ProcessIDList []string // UpdateTime of profiling task UpdateTime int64 // StartTime of profiling task, when need to start to profiling StartTime int64 // TriggerType of task TriggerType TriggerType // TargetType of task TargetType TargetType // MaxRunningDuration of task MaxRunningDuration time.Duration ExtensionConfig *ExtensionConfig }
func ProfilingTaskFromCommand ¶
func ProfilingTaskFromCommand(command *v3.Command) (*ProfilingTask, error)
func ProfilingTaskFromContinuous ¶ added in v0.5.0
func ProfilingTaskFromContinuous(processes []api.ProcessInterface, taskSetter func(task *ProfilingTask)) *ProfilingTask
type ProtocolAnalyzeConfig ¶ added in v0.4.0
type ProtocolAnalyzeConfig struct { PerCPUBufferSize string `mapstructure:"per_cpu_buffer"` Parallels int `mapstructure:"parallels"` QueueSize int `mapstructure:"queue_size"` Sampling SamplingConfig `mapstructure:"sampling"` }
type Runner ¶ added in v0.2.0
func NewBaseRunner ¶ added in v0.2.0
func NewBaseRunner() *Runner
func (*Runner) GenerateProfilingData ¶ added in v0.2.0
type SamplingConfig ¶ added in v0.4.0
type SamplingConfig struct {
HTTP HTTPSamplingConfig `mapstructure:"http"`
}
type TargetType ¶
type TargetType string
const ( TargetTypeOnCPU TargetType = "ON_CPU" TargetTypeOffCPU TargetType = "OFF_CPU" TargetTypeNetworkTopology TargetType = "NETWORK" )
func ParseTargetType ¶
func ParseTargetType(err error, val string) (TargetType, error)
func (TargetType) InitTask ¶
func (t TargetType) InitTask(task *ProfilingTask, command *v3.Command) error
type TaskConfig ¶
type TaskConfig struct { OnCPU *OnCPUConfig `mapstructure:"on_cpu"` // ON_CPU type of profiling task config Network *NetworkConfig `mapstructure:"network"` // NETWORK type of profiling task config }
func (*TaskConfig) Validate ¶ added in v0.4.0
func (c *TaskConfig) Validate() error
type TriggerType ¶
type TriggerType string
const (
TriggerTypeFixedTime TriggerType = "FIXED_TIME"
)
func ParseTriggerType ¶
func ParseTriggerType(err error, val string) (TriggerType, error)
func (TriggerType) InitTask ¶
func (t TriggerType) InitTask(task *ProfilingTask, command *v3.Command) error
Click to show internal directories.
Click to hide internal directories.