strprofile

package
v0.0.103-dev Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stringify

func Stringify(p *profilev1.Profile, opts Options) (string, error)

Types

type CompactLocation

type CompactLocation struct {
	ID      uint64   `json:"id,omitempty"`
	Address string   `json:"address,omitempty"`
	Lines   []string `json:"lines,omitempty"`
	Mapping string   `json:"mapping,omitempty"`
}

type CompactProfile

type CompactProfile struct {
	SampleTypes   []SampleType    `json:"sample_types"`
	Samples       []CompactSample `json:"samples"`
	TimeNanos     string          `json:"time_nanos,omitempty"`
	DurationNanos string          `json:"duration_nanos,omitempty"`
	Period        string          `json:"period,omitempty"`
}

func ToCompactProfile

func ToCompactProfile(p *profilev1.Profile, opts Options) CompactProfile

type CompactSample

type CompactSample struct {
	Locations []CompactLocation `json:"locations,omitempty"`
	Values    string            `json:"values"`
	Labels    string            `json:"labels,omitempty"`
}

type Function

type Function struct {
	ID         uint64 `json:"id,omitempty"`
	Name       string `json:"name"`
	SystemName string `json:"system_name,omitempty"`
	Filename   string `json:"filename,omitempty"`
	StartLine  int64  `json:"start_line,omitempty"`
}

type Label

type Label struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Line

type Line struct {
	Function *Function `json:"function"`
	Line     int64     `json:"line,omitempty"`
}

type Location

type Location struct {
	ID      uint64   `json:"id,omitempty"`
	Address string   `json:"address,omitempty"`
	Lines   []Line   `json:"lines,omitempty"`
	Mapping *Mapping `json:"mapping,omitempty"`
}

type Mapping

type Mapping struct {
	ID       uint64 `json:"id,omitempty"`
	Start    string `json:"start"`
	Limit    string `json:"limit"`
	Offset   string `json:"offset,omitempty"`
	Filename string `json:"filename,omitempty"`
	BuildID  string `json:"build_id,omitempty"`
}

type Options

type Options struct {
	NoPrettyPrint bool
	NoDuration    bool
	NoTime        bool
	NoCompact     bool
	IncludeIDs    bool
}

type Profile

type Profile struct {
	SampleTypes   []SampleType `json:"sample_types"`
	Samples       []Sample     `json:"samples"`
	TimeNanos     string       `json:"time_nanos,omitempty"`
	DurationNanos string       `json:"duration_nanos,omitempty"`
	Period        string       `json:"period,omitempty"`
}

func ToDetailedProfile

func ToDetailedProfile(p *profilev1.Profile, opts Options) Profile

type Sample

type Sample struct {
	Locations []Location `json:"locations,omitempty"`
	Values    []int64    `json:"values"`
	Labels    []Label    `json:"labels,omitempty"`
}

type SampleType

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

Jump to

Keyboard shortcuts

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