convert

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollapsedToProfile

func CollapsedToProfile(b []byte, name string, maxNodes int) (*flamebearer.FlamebearerProfile, error)

func Converter

Converter returns a ConverterFn that converts to FlamebearerProfile and overrides any specified fields.

func FlamebearerFromFile

func FlamebearerFromFile(f ProfileFile, maxNodes int) (*flamebearer.FlamebearerProfile, error)

func JSONToProfile

func JSONToProfile(b []byte, name string, _ int) (*flamebearer.FlamebearerProfile, error)

func PerfScriptToProfile

func PerfScriptToProfile(b []byte, name string, maxNodes int) (*flamebearer.FlamebearerProfile, error)

func PprofToProfile

func PprofToProfile(b []byte, name string, maxNodes int) (*flamebearer.FlamebearerProfile, error)

Types

type ConverterFn

type ConverterFn func(b []byte, name string, maxNodes int) (*flamebearer.FlamebearerProfile, error)

type ProfileFile

type ProfileFile struct {
	// Name of the file in which the profile was saved. Optional.
	// example: pyroscope.server.cpu-2022-01-23T14:31:43Z.json
	Name string
	// Type of profile. Optional.
	Type     ProfileFileType
	TypeData ProfileFileTypeData
	// Raw profile bytes. Required, min length 2.
	Data []byte
}

ProfileFile represents content to be converted to flamebearer.

type ProfileFileType

type ProfileFileType string
const (
	ProfileFileTypeJSON       ProfileFileType = "json"
	ProfileFileTypePprof      ProfileFileType = "pprof"
	ProfileFileTypeCollapsed  ProfileFileType = "collapsed"
	ProfileFileTypePerfScript ProfileFileType = "perf_script"
)

type ProfileFileTypeData

type ProfileFileTypeData struct {
	SpyName string
	Units   metadata.Units
}

Jump to

Keyboard shortcuts

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