parser

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllFunctionNamesV2 added in v1.8.0

func GetAllFunctionNamesV2(profilePath string, filter internal.FunctionFilter) (names []string, err error)

GetAllFunctionNamesV2 extracts all function names from a pprof file, the function name is the name after the last dot.

func OrganizeProfileByPackageV2 added in v1.8.1

func OrganizeProfileByPackageV2(profilePath string, filter internal.FunctionFilter) (string, error)

OrganizeProfileByPackageV2 organizes profile data by package/module and returns a formatted string that groups functions by their package/module with subtotals and percentages.

Types

type FuncEntry added in v1.8.0

type FuncEntry struct {
	Name string
	Flat int64
}

FuncEntry represents a function with its flat value, sorted by flat value (descending)

type FunctionInfo added in v1.8.1

type FunctionInfo struct {
	Name           string
	FullName       string
	Flat           float64
	FlatPercentage float64
	Cum            float64
	CumPercentage  float64
	SumPercentage  float64
}

FunctionInfo represents a function with its performance metrics

type LineObj

type LineObj struct {
	FnName         string
	Flat           float64
	FlatPercentage float64
	SumPercentage  float64
	Cum            float64
	CumPercentage  float64
}

func TurnLinesIntoObjectsV2 added in v1.8.0

func TurnLinesIntoObjectsV2(profilePath string) ([]*LineObj, error)

TurnLinesIntoObjectsV2 turn profile data from a .pprof file into line objects.

type PackageGroup added in v1.8.1

type PackageGroup struct {
	Name           string
	Functions      []*FunctionInfo
	TotalFlat      float64
	TotalCum       float64
	FlatPercentage float64
	CumPercentage  float64
}

PackageGroup represents a group of functions from the same package

type ProfileData added in v1.8.0

type ProfileData struct {
	Flat  map[string]int64
	Cum   map[string]int64
	Total int64

	FlatPercentages map[string]float64
	CumPercentages  map[string]float64
	SumPercentages  map[string]float64
	SortedEntries   []FuncEntry
}

ProfileData contains the extracted flat and cumulative data from a pprof profile

Jump to

Keyboard shortcuts

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