Documentation
¶
Index ¶
- Variables
- func AttachBackgroundExecutorKey(ctx context.Context) context.Context
- func AttachBuildPlanMarkKey(ctx context.Context, counter *CounterSet) context.Context
- func AttachCalcTableRowsKey(ctx context.Context) context.Context
- func AttachCalcTableSizeKey(ctx context.Context) context.Context
- func AttachCalcTableStatsKey(ctx context.Context) context.Context
- func AttachCompilePlanMarkKey(ctx context.Context, counter *CounterSet) context.Context
- func AttachExecPipelineKey(ctx context.Context, counter *CounterSet) context.Context
- func AttachS3RequestKey(ctx context.Context, counter *CounterSet) context.Context
- func AttachTxnExecutorKey(ctx context.Context) context.Context
- func GetCacheStats(callback func(info []*query.CacheInfo))
- func IsInternalExecutor(ctx context.Context) bool
- func LogNodeCacheStats(uuid string)
- func NameForFileService(nodeType string, uuid string, fsName string) string
- func NameForNode(nodeType, uuid string) string
- func Update(ctx context.Context, fn func(*CounterSet), extraCounterSets ...*CounterSet)
- func WithCounterSet(ctx context.Context, sets ...*CounterSet) context.Context
- func WithCounterSetFrom(ctx context.Context, fromCtx context.Context) context.Context
- type BackgroundExecutorKey
- type BuildPlanMarkKey
- type CalcTableRowsKey
- type CalcTableSizeKey
- type CalcTableStatsKey
- type CompilePlanMarkKey
- type CounterSet
- type CounterSets
- type ExecPipelineMarkKey
- type FileServiceCounterSet
- type S3RequestKey
- type TxnExecutorKey
Constants ¶
This section is empty.
Variables ¶
var CtxKeyCounters = ctxKeyCounters{}
var NameForGlobal = func() string { name := "global" Named.Store(name, globalCounterSet) return name }()
var Named sync.Map
Functions ¶
func AttachBuildPlanMarkKey ¶
func AttachBuildPlanMarkKey(ctx context.Context, counter *CounterSet) context.Context
AttachBuildPlanMarkKey attaches a *CounterSet to the given context with a BuildPlanMarkKey.
func AttachCompilePlanMarkKey ¶
func AttachCompilePlanMarkKey(ctx context.Context, counter *CounterSet) context.Context
AttachCompilePlanMarkKey attaches a *CounterSet to the given context with a CompilePlanMarkKey.
func AttachExecPipelineKey ¶
func AttachExecPipelineKey(ctx context.Context, counter *CounterSet) context.Context
AttachExecPipelineKey attaches a *CounterSet to the given context with an ExecPipelineMarkKey.
func AttachS3RequestKey ¶
func AttachS3RequestKey(ctx context.Context, counter *CounterSet) context.Context
AttachS3RequestKey attaches a *CounterSet to the given context with an S3RequestKey.
func GetCacheStats ¶ added in v1.1.0
GetCacheStats returns the cache stats for nodes.
func IsInternalExecutor ¶
IsInternalExecutor checks if the given context contains the TxnExecutorKey
func LogNodeCacheStats ¶ added in v1.1.0
func LogNodeCacheStats(uuid string)
func NameForFileService ¶ added in v1.1.0
func NameForNode ¶ added in v1.1.0
func Update ¶
func Update(ctx context.Context, fn func(*CounterSet), extraCounterSets ...*CounterSet)
func WithCounterSet ¶
func WithCounterSet(ctx context.Context, sets ...*CounterSet) context.Context
Types ¶
type BackgroundExecutorKey ¶
type BackgroundExecutorKey struct{}
Background Executor Internal Executor
type BuildPlanMarkKey ¶
type BuildPlanMarkKey struct{}
BuildPlanMarkKey is an empty struct used as a key for attaching a build plan counter to a context.
type CalcTableRowsKey ¶
type CalcTableRowsKey struct{}
type CalcTableSizeKey ¶
type CalcTableSizeKey struct{}
type CalcTableStatsKey ¶
type CalcTableStatsKey struct{}
------------------------------------------------------------------------------------------------
type CompilePlanMarkKey ¶
type CompilePlanMarkKey struct{}
CompilePlanMarkKey is an empty struct used as a key for attaching a compile plan counter to a context.
type CounterSet ¶
type CounterSet struct {
FileService FileServiceCounterSet
}
func GetS3RequestKey ¶
func GetS3RequestKey(ctx context.Context) (*CounterSet, bool)
func (*CounterSet) Reset ¶
func (c *CounterSet) Reset()
func (*CounterSet) ServeHTTP ¶
func (c *CounterSet) ServeHTTP(w http.ResponseWriter, req *http.Request)
type CounterSets ¶
type CounterSets = map[*CounterSet]struct{}
type ExecPipelineMarkKey ¶
type ExecPipelineMarkKey struct{}
ExecPipelineMarkKey is an empty struct used as a key for attaching an execution pipeline counter to a context.
type FileServiceCounterSet ¶
type FileServiceCounterSet struct {
S3 struct {
List atomic.Int64 // listObjects:List all Objects [Put type request]
Head atomic.Int64 // statObject:View all meta information contained in the object [Get type request]
Put atomic.Int64 // putObject:Upload an Object [Put type request]
Get atomic.Int64 // getObject:Download an Object [Get type request]
Delete atomic.Int64 // deleteObject:Delete a single Object [Put type request]
DeleteMulti atomic.Int64 // deleteObjects:Delete multiple Objects [Put type request]
}
Cache struct {
Read atomic.Int64 // CacheRead
Hit atomic.Int64 // CacheHit
Memory struct {
Read atomic.Int64 // CacheMemoryRead
Hit atomic.Int64 // CacheMemoryHit
}
Disk struct {
Read atomic.Int64 // CacheDiskRead
Hit atomic.Int64 // CacheDiskHit
}
Remote struct {
Read atomic.Int64 // CacheRemoteRead
Hit atomic.Int64 // CacheRemoteHit
}
}
// ReadSize: actual bytes read from storage layer (excluding rowid tombstone)
ReadSize atomic.Int64
// S3ReadSize: actual bytes read from S3 (excluding rowid tombstone)
S3ReadSize atomic.Int64
// DiskReadSize: actual bytes read from disk cache (excluding rowid tombstone)
DiskReadSize atomic.Int64
}
type S3RequestKey ¶
type S3RequestKey struct{}
---------------------------------------------------------------------------------------------------------------------- S3RequestKey is an empty struct used as a key for attaching S3 request counters to a context, which used to count the usage of S3 resources when a certain function is called