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: 0

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