task

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckProfilingTaskConfig

func CheckProfilingTaskConfig(taskConfig *base.TaskConfig, moduleMgr *module.Manager) error

func NewProfilingRunner

func NewProfilingRunner(taskType base.TargetType, taskConfig *base.TaskConfig, moduleMgr *module.Manager) (base.ProfileTaskRunner, error)

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

Context of profiling task

func (*Context) BuildTaskIdentity

func (c *Context) BuildTaskIdentity() string

BuildTaskIdentity for filter with same identity task

func (*Context) CheckTaskRunnable

func (c *Context) CheckTaskRunnable() bool

CheckTaskRunnable means checks the task could be running

func (*Context) IsRunning added in v0.5.0

func (c *Context) IsRunning() bool

func (*Context) IsSameTask added in v0.3.0

func (c *Context) IsSameTask(other *Context) bool

func (*Context) RunningTime added in v0.5.0

func (c *Context) RunningTime() time.Time

func (*Context) TaskID

func (c *Context) TaskID() string

func (*Context) UpdateTime

func (c *Context) UpdateTime() int64

UpdateTime of the profiling task

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(ctx context.Context, moduleMgr *module.Manager, taskConfig *base.TaskConfig) (*Manager, error)

func (*Manager) BuildContextFromCommand added in v0.5.0

func (m *Manager) BuildContextFromCommand(command *common_v3.Command) (*Context, error)

func (*Manager) BuildContextFromContinuous added in v0.5.0

func (m *Manager) BuildContextFromContinuous(processes []api.ProcessInterface,
	taskSetter func(task *base.ProfilingTask), taskIDGenerator func() (string, error)) (*Context, error)

func (*Manager) FlushProfilingData added in v0.5.0

func (m *Manager) FlushProfilingData() error

func (*Manager) Shutdown

func (m *Manager) Shutdown() error

func (*Manager) ShutdownAndRemoveTask added in v0.4.0

func (m *Manager) ShutdownAndRemoveTask(c *Context) error

func (*Manager) Start

func (m *Manager) Start()

func (*Manager) StartTask

func (m *Manager) StartTask(c *Context)

func (*Manager) StartingWatchTask added in v0.5.0

func (m *Manager) StartingWatchTask() error

type RunningStatus

type RunningStatus uint8
const (
	NotRunning RunningStatus
	Running
	Stopped
)

Jump to

Keyboard shortcuts

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