stats

package
v3.95.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompilationStats

type CompilationStats struct {
	FromCache bool
	Duration  time.Duration
	CPUTime   time.Duration
}

CompilationStats holds query compilation statistics.

type OperationStats

type OperationStats struct {
	Rows  uint64
	Bytes uint64
}

type Phase

type Phase struct {
	Duration       time.Duration
	TableAccess    []TableAccess
	CPUTime        time.Duration
	AffectedShards uint64
	LiteralPhase   bool
}

type QueryPhase

type QueryPhase interface {
	// NextTableAccess returns next accessed table within query execution phase.
	// If ok flag is false, then there are no more accessed tables and t is invalid.
	NextTableAccess() (t *TableAccess, ok bool)
	Duration() time.Duration
	CPUTime() time.Duration
	AffectedShards() uint64
	IsLiteralPhase() bool
}

QueryPhase holds query execution phase statistics.

type QueryStats

type QueryStats interface {
	ProcessCPUTime() time.Duration
	Compilation() (c *CompilationStats)
	QueryPlan() string
	QueryAST() string
	TotalCPUTime() time.Duration
	TotalDuration() time.Duration

	// NextPhase returns next execution phase within query.
	// If ok flag is false, then there are no more phases and p is invalid.
	NextPhase() (p QueryPhase, ok bool)
}

QueryStats holds query execution statistics.

func FromQueryStats

func FromQueryStats(pb *Ydb_TableStats.QueryStats) QueryStats

type TableAccess

type TableAccess struct {
	Name            string
	Reads           OperationStats
	Updates         OperationStats
	Deletes         OperationStats
	PartitionsCount uint64
}

TableAccess contains query execution phase's table access statistics.

Jump to

Keyboard shortcuts

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