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 ¶
View Source
const ( IsFirstMask = 1 << 0 // 0001 IsLastMask = 1 << 1 // 0010 )
View Source
const DiskIO = "Disk IO"
View Source
const ExternalScan = "External Scan"
View Source
const FSCacheDiskHit = "FileService Cache Disk Hit"
View Source
const FSCacheDiskRead = "FileService Cache Disk Read"
View Source
const FSCacheHit = "FileService Cache Hit"
View Source
const FSCacheMemoryHit = "FileService Cache Memory Hit"
View Source
const FSCacheMemoryRead = "FileService Cache Memory Read"
View Source
const FSCacheRead = "FileService Cache Read"
View Source
const FSCacheRemoteHit = "FileService Cache Remote Hit"
View Source
const FSCacheRemoteRead = "FileService Cache Remote Read"
View Source
const InputRows = "Input Rows"
View Source
const InputSize = "Input Size"
View Source
const InsertTime = "Insert Time"
View Source
const MemorySize = "Memory Size"
View Source
const Network = "Network"
View Source
const OutputRows = "Output Rows"
View Source
const OutputSize = "Output Size"
View Source
const S3Delete = "S3 Delete Count"
View Source
const S3DeleteMul = "S3 DeleteMul Count"
View Source
const S3Get = "S3 Get Count"
View Source
const S3Head = "S3 Head Count"
View Source
const S3List = "S3 List Count"
View Source
const S3Put = "S3 Put Count"
View Source
const ScanBytes = "Scan Bytes"
View Source
const ScanTime = "Scan Time"
View Source
const TableScan = "Table Scan"
View Source
const TimeConsumed = "Time Consumed"
View Source
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
type Step ¶
type TotalStats ¶
Click to show internal directories.
Click to hide internal directories.