common

package
v1.3.11 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProfileData

type ProfileData = profile_models.DataWrapper

ProfileData is profile result. raw data is []byte, wrapped in a struct for expansibility

type ProfileType

type ProfileType string
const (
	ProfileTypeCPU       ProfileType = "cpu" //type are identical to defines in runtime/pprof/profiles
	ProfileTypeHeap      ProfileType = "heap"
	ProfileTypeBlock     ProfileType = "block"
	ProfileTypeMutex     ProfileType = "mutex"
	ProfileTypeGoroutine ProfileType = "goroutine"
)

func FromString

func FromString(s string) (ProfileType, bool)

func (ProfileType) ToString

func (pt ProfileType) ToString() string

type ProfileTypeConfig

type ProfileTypeConfig struct {
	ProfileType            ProfileType  `json:"profile_type"`
	DurationSeconds        int64        `json:"duration_seconds"`
	IsSnapshot             bool         `json:"is_snapshot"`
	TargetDeltaSampleTypes []SampleType `json:"target_delta_sample_types"` // calculate delta for these sampleTypes
}

type SampleType

type SampleType struct {
	Type string `json:"type"`
	Unit string `json:"unit"`
}

type Task

type Task struct {
	Name              string
	ProfileID         int64
	UploadID          string
	ProfileTypes      []ProfileType
	PtConfigs         []ProfileTypeConfig
	StartTimeMilliSec int64
	EndTimeMilliSec   int64
	UseCache          bool // use cache to compute delta. only continuous profile support this option
}

func (*Task) FindConfig

func (t *Task) FindConfig(pt ProfileType) (ProfileTypeConfig, bool)

Jump to

Keyboard shortcuts

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