Documentation
¶
Index ¶
- Constants
- func CalcTotalS3Requests(gblStats GblStats, statsInfo *statistic.StatsInfo) (list, head, put, get, delete, deleteMul, writtenRows, deletedRows int64)
- func ExplainPhyPlan(phy *PhyPlan, statsInfo *statistic.StatsInfo, option ExplainOption) string
- func PhyPlanToJSON(p *PhyPlan) (string, error)
- func PrintPipelineTree(node *PhyOperator, prefix string, isRoot, isTail bool, option ExplainOption, ...)
- type Edge
- type ExplainData
- type ExplainOption
- type GblStats
- type Global
- type GraphData
- type Label
- type Node
- type PhyOperator
- type PhyPlan
- type PhyReceiver
- type PhyScope
- type PhySource
- type PlanStats
- type StatisticValue
- type Statistics
- type Stats
- type Step
- type TotalStats
Constants ¶
const ( IsFirstMask = 1 << 0 // 0001 IsLastMask = 1 << 1 // 0010 )
const DiskIO = "Disk IO"
const ExternalScan = "External Scan"
const FSCacheDiskHit = "FileService Cache Disk Hit"
const FSCacheDiskRead = "FileService Cache Disk Read"
const FSCacheHit = "FileService Cache Hit"
const FSCacheMemoryHit = "FileService Cache Memory Hit"
const FSCacheMemoryRead = "FileService Cache Memory Read"
const FSCacheRead = "FileService Cache Read"
const FSCacheRemoteHit = "FileService Cache Remote Hit"
const FSCacheRemoteRead = "FileService Cache Remote Read"
const InputRows = "Input Rows"
const InputSize = "Input Size"
const InsertTime = "Insert Time"
const MemorySize = "Memory Size"
const Network = "Network"
const OutputRows = "Output Rows"
const OutputSize = "Output Size"
const S3Delete = "S3 Delete Count"
const S3DeleteMul = "S3 DeleteMul Count"
const S3Get = "S3 Get Count"
const S3Head = "S3 Head Count"
const S3List = "S3 List Count"
const S3Put = "S3 Put Count"
const ScanBytes = "Scan Bytes"
const ScanTime = "Scan Time"
const TableScan = "Table Scan"
const TimeConsumed = "Time Consumed"
const WaitTime = "Wait Time"
Variables ¶
This section is empty.
Functions ¶
func CalcTotalS3Requests ¶
func CalcTotalS3Requests(gblStats GblStats, statsInfo *statistic.StatsInfo) (list, head, put, get, delete, deleteMul, writtenRows, deletedRows int64)
CalcTotalS3Requests calculates the total number of S3 requests (List, Head, Put, Get, Delete, DeleteMul) by summing up values from global statistics (gblStats) and different stages of the execution process (PlanStage, CompileStage, and PrepareRunStage) in the statsInfo.
func ExplainPhyPlan ¶
func ExplainPhyPlan(phy *PhyPlan, statsInfo *statistic.StatsInfo, option ExplainOption) string
ExplainPhyPlan used to `mo_explan_phy` internal function
func PhyPlanToJSON ¶
func PrintPipelineTree ¶
func PrintPipelineTree(node *PhyOperator, prefix string, isRoot, isTail bool, option ExplainOption, buffer *bytes.Buffer)
Types ¶
type ExplainData ¶
type ExplainData struct {
Steps []Step `json:"steps"`
Code uint16 `json:"code"`
Message string `json:"message"`
Uuid string `json:"uuid"`
PhyPlan PhyPlan
NewPlanStats statistic.StatsInfo
}
func NewExplainData ¶
func NewExplainData(uuid uuid.UUID) *ExplainData
func NewExplainDataFail ¶
func NewExplainDataFail(uuid uuid.UUID, code uint16, msg string) *ExplainData
func (*ExplainData) StatisticsRead
deprecated
func (d *ExplainData) StatisticsRead() (rows int64, size int64)
StatisticsRead statistics read rows, size in ExplainData
Deprecated: please use explain.GetInputRowsAndInputSize instead.
type ExplainOption ¶
type ExplainOption int
const ( NormalOption ExplainOption = iota VerboseOption AnalyzeOption )
type GblStats ¶
type GblStats struct {
ScopePrepareTimeConsumed int64
OperatorTimeConsumed int64
MemorySize int64
SpillSize int64
NetWorkSize int64
DiskIOSize int64
S3ListRequest int64
S3HeadRequest int64
S3PutRequest int64
S3GetRequest int64
S3DeleteRequest int64
S3DeleteMultiRequest int64
WrittenRows int64
DeletedRows int64
}
GblStats used to hold the total time and wait time of physical plan execution, rename to PhyGblStats
func ExtractPhyPlanGlbStats ¶
Function to process the entire PhyPlan and extract the stats
type Global ¶
type Global struct {
Statistics Statistics `json:"statistics"`
TotalStats TotalStats `json:"totalStats"`
}
type GraphData ¶
type GraphData struct {
Nodes []Node `json:"nodes"`
Edges []Edge `json:"edges"`
Labels []Label `json:"labels"`
Global Global `json:"global"`
}
func NewGraphData ¶
type Node ¶
type Node struct {
NodeId string `json:"id"`
Name string `json:"name"`
Title string `json:"title"`
Labels []Label `json:"labels"`
Statistics Statistics `json:"statistics"`
Stats Stats `json:"stats"`
TotalStats TotalStats `json:"totalStats"`
}
type PhyOperator ¶
type PhyOperator struct {
OpName string `json:"OpName"`
NodeIdx int `json:"NodeIdx"`
Status uint8 `json:"Status"`
DestReceiver []PhyReceiver `json:"toMergeReceiver,omitempty"`
OpStats *process.OperatorStats `json:"OpStats,omitempty"`
Children []*PhyOperator `json:"Children,omitempty"`
IsFirst bool `json:"IsFirst,omitempty"`
IsLast bool `json:"IsLast,omitempty"`
}
type PhyPlan ¶
type PhyPlan struct {
Version string `json:"version"`
RetryTime int `json:"retryTime,omitempty"`
LocalScope []PhyScope `json:"scope,omitempty"`
RemoteScope []PhyScope `json:"RemoteScope,omitempty"`
}
func JSONToPhyPlan ¶
func NewPhyPlan ¶
func NewPhyPlan() *PhyPlan
type PhyReceiver ¶
type PhyScope ¶
type PhyScope struct {
Magic string `json:"Magic"`
Mcpu int8 `json:"Mcpu,omitempty"`
Receiver []PhyReceiver `json:"Receiver,omitempty"`
DataSource *PhySource `json:"DataSource,omitempty"`
PreScopes []PhyScope `json:"PreScopes,omitempty"`
RootOperator *PhyOperator `json:"RootOperator,omitempty"`
PrepareTimeConsumed int64 `json:"PrepareTimeConsumed,omitempty"`
}
type StatisticValue ¶
type StatisticValue struct {
Name string `json:"name"`
Value int64 `json:"value"`
Unit string `json:"unit"`
}
func NewStatisticValue ¶
func NewStatisticValue(name string, unit string) *StatisticValue
type Statistics ¶
type Statistics struct {
Time []StatisticValue `json:"Time"`
Memory []StatisticValue `json:"Memory"`
Throughput []StatisticValue `json:"Throughput"`
IO []StatisticValue `json:"IO"`
Network []StatisticValue `json:"Network"`
}
func NewStatistics ¶
func NewStatistics() *Statistics