base

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MissingSymbol = "[MISSING]"

Variables

This section is empty.

Functions

This section is empty.

Types

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, process 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
	// ProcessID of need to monitoring process
	ProcessID 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
}

func ProfilingTaskFromCommand

func ProfilingTaskFromCommand(command *v3.Command) (*ProfilingTask, error)

type TargetType

type TargetType string
const (
	TargetTypeOnCPU TargetType = "ON_CPU"
)

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
}

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

Jump to

Keyboard shortcuts

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