profile

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNodeCostMap

func GetNodeCostMap(traceData []ogcore.EventTrace) map[string]NodeCost

Types

type NodeCost

type NodeCost struct {
	NodeName      string
	TotalCost     time.Duration
	SelfCost      time.Duration
	BeforeRunCost time.Duration
	AfterRunCost  time.Duration
}

func ListNodeCost

func ListNodeCost(traceData []ogcore.EventTrace, limitN int) []NodeCost

type NodeCostList

type NodeCostList []NodeCost

func (NodeCostList) Len

func (a NodeCostList) Len() int

func (NodeCostList) Less

func (a NodeCostList) Less(i, j int) bool

func (NodeCostList) Swap

func (a NodeCostList) Swap(i, j int)

type Profiler

type Profiler struct {
	CostGraph *internal.Graph[SlowPathNode]
	TraceData []ogcore.EventTrace
}

func NewProfiler

func NewProfiler[E any](graphData *internal.Graph[E], traceData []ogcore.EventTrace) *Profiler

func (*Profiler) GetSlowHint

func (profiler *Profiler) GetSlowHint() string

type SlowPathNode

type SlowPathNode struct {
	Name    string
	Cost    time.Duration
	CostSum time.Duration
	Prev    *SlowPathNode
}

func (*SlowPathNode) PrintPath

func (n *SlowPathNode) PrintPath() string

Jump to

Keyboard shortcuts

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