pmodel

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExplainAnalyzeResultNode

type ExplainAnalyzeResultNode struct {
	Lines     []string
	TableName string

	EstimatedInitCost     null.Float
	EstimatedCost         null.Float
	EstimatedReturnedRows null.Int
	EstimatedWidth        null.Int

	ActualTimeFirstRow null.Float
	ActualTimeAvg      null.Float
	ActualReturnedRows null.Int
	ActualLoopCount    null.Int
}

ExplainAnalyzeResultNode is the parsed information from `EXPLAIN (ANALYZE, BUFFERS)` query c.f)

https://www.postgresql.org/docs/14/using-explain.html
https://github.com/postgres/postgres/blob/REL_14_5/src/backend/commands/explain.c#L1144

func ParseExplainAnalyzeResultLineNode

func ParseExplainAnalyzeResultLineNode(lines []string) (int, *ExplainAnalyzeResultNode, error)

func (*ExplainAnalyzeResultNode) EstimatedTotalTime

func (n *ExplainAnalyzeResultNode) EstimatedTotalTime() float64

func (*ExplainAnalyzeResultNode) String

func (n *ExplainAnalyzeResultNode) String() string

func (*ExplainAnalyzeResultNode) Title

func (n *ExplainAnalyzeResultNode) Title() string

type ExplainAnalyzeTree

type ExplainAnalyzeTree struct {
	Root        *ExplainAnalyzeTreeNode
	SummaryText string
}

func (*ExplainAnalyzeTree) ToSingleTableResults

func (eat *ExplainAnalyzeTree) ToSingleTableResults() []*dmodel.SingleTableExplainResult

func (*ExplainAnalyzeTree) ToViewModel

type ExplainAnalyzeTreeNode

type ExplainAnalyzeTreeNode struct {
	AnalyzeResultNode *ExplainAnalyzeResultNode
	Children          []*ExplainAnalyzeTreeNode
	SpaceSize         int
}

func (*ExplainAnalyzeTreeNode) EstimatedTotalTime

func (n *ExplainAnalyzeTreeNode) EstimatedTotalTime() float64

func (*ExplainAnalyzeTreeNode) GetChildren

func (n *ExplainAnalyzeTreeNode) GetChildren() []dservice.ExplainNode

func (*ExplainAnalyzeTreeNode) TableName

func (n *ExplainAnalyzeTreeNode) TableName() string

func (*ExplainAnalyzeTreeNode) ToViewModel

Jump to

Keyboard shortcuts

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