Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProfileTypeCPU = "cpu" ProfileTypeHeap = "heap" ProfileTypeBlock = "block" ProfileTypeMutex = "mutex" ProfileTypeGoroutine = "goroutine" ProfileTypeOther = "other" )
Variables ¶
This section is empty.
Functions ¶
func AllProfileTypes ¶
func AllProfileTypes() []string
func GetProfileType ¶
func GetProfileType() []string
Types ¶
type Client ¶
func (*Client) GetProfiles ¶
func (c *Client) GetProfiles(ctx context.Context, req GetProfilesRequest) (*GetProfilesResponse, error)
GET /api/0/profiles?service=<service>&type=<type>from=<created_from>&to=<created_to>&labels=<key=value,key=value>
func (*Client) GetServices ¶ added in v0.1.0
func (c *Client) GetServices(ctx context.Context) (*GetServicesResponse, error)
GET /api/0/services
func (*Client) SavePprof ¶
func (c *Client) SavePprof(ctx context.Context, req SavePprofRequest) (*SavePprofResponse, error)
https://github.com/profefe/profefe#save-pprof-data POST /api/0/profiles?service=<service>&instance_id=<iid>&type=[cpu|heap]&labels=<key=value,key=value> body pprof.pb.gz
type GetProfilesRequest ¶
type GetProfilesResponse ¶
type GetServicesResponse ¶ added in v0.1.0
type ProfileType ¶
type ProfileType int8
const ( UnknownProfile ProfileType = iota CPUProfile HeapProfile BlockProfile MutexProfile GoroutineProfile ThreadcreateProfile OtherProfile = 127 )
func NewProfileTypeFromString ¶
func NewProfileTypeFromString(s string) ProfileType
func (ProfileType) String ¶
func (ptype ProfileType) String() string
type SavePprofRequest ¶
type SavePprofRequest struct { Profile *profile.Profile // service name Service string // an identifier of running instance InstanceID string // cpu, heap, block, mutex, or goroutine Type ProfileType // a set of key-value pairs, e.g. "region=europe-west3,dc=fra,ip=1.2.3.4,version=1.0" Labels map[string]string }
Click to show internal directories.
Click to hide internal directories.