perfcounter

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CtxKeyCounters = ctxKeyCounters{}
View Source
var NameForGlobal = func() string {

	name := "global"
	Named.Store(name, globalCounterSet)
	return name
}()
View Source
var Named sync.Map

Functions

func GetCacheStats added in v1.1.0

func GetCacheStats(callback func(info []*query.CacheInfo))

GetCacheStats returns the cache stats for nodes.

func LogNodeCacheStats added in v1.1.0

func LogNodeCacheStats(uuid string)

func NameForFileService added in v1.1.0

func NameForFileService(nodeType string, uuid string, fsName string) string

func NameForNode added in v1.1.0

func NameForNode(nodeType, uuid string) string

func NewCounterLogExporter

func NewCounterLogExporter(counter *CounterSet) stats.LogExporter

func Update

func Update(ctx context.Context, fn func(*CounterSet), extraCounterSets ...*CounterSet)

func WithCounterSet

func WithCounterSet(ctx context.Context, sets ...*CounterSet) context.Context

func WithCounterSetFrom

func WithCounterSetFrom(ctx context.Context, fromCtx context.Context) context.Context

Types

type CounterLogExporter

type CounterLogExporter struct {
	// contains filtered or unexported fields
}

func (*CounterLogExporter) Export

func (c *CounterLogExporter) Export() []zap.Field

Export returns the fields and its values in loggable format.

type CounterSet

type CounterSet struct {
	FileService FileServiceCounterSet
	DistTAE     DistTAECounterSet
	TAE         TAECounterSet
}

func (*CounterSet) IterFields

func (c *CounterSet) IterFields(fn IterFieldsFunc) error

func (*CounterSet) ServeHTTP

func (c *CounterSet) ServeHTTP(w http.ResponseWriter, req *http.Request)

type CounterSets

type CounterSets = map[*CounterSet]struct{}

type DistTAECounterSet

type DistTAECounterSet struct {
	Logtail struct {
		Entries               stats.Counter
		InsertEntries         stats.Counter
		MetadataInsertEntries stats.Counter
		DeleteEntries         stats.Counter
		MetadataDeleteEntries stats.Counter

		InsertRows   stats.Counter
		DeleteRows   stats.Counter
		ActiveRows   stats.Counter
		InsertBlocks stats.Counter
	}
}

type FileServiceCounterSet

type FileServiceCounterSet struct {
	S3 struct {
		List        stats.Counter
		Head        stats.Counter
		Put         stats.Counter
		Get         stats.Counter
		Delete      stats.Counter
		DeleteMulti stats.Counter
	}

	Cache struct {
		Read   stats.Counter
		Hit    stats.Counter
		Memory struct {
			Read      stats.Counter
			Hit       stats.Counter
			Capacity  stats.Counter
			Used      stats.Counter
			Available stats.Counter
		}
		Disk struct {
			Read             stats.Counter
			Hit              stats.Counter
			GetFileContent   stats.Counter
			SetFileContent   stats.Counter
			OpenIOEntryFile  stats.Counter
			OpenFullFile     stats.Counter
			CreateFile       stats.Counter
			StatFile         stats.Counter
			WriteFile        stats.Counter
			Error            stats.Counter
			Evict            stats.Counter
			EvictPending     stats.Counter
			EvictImmediately stats.Counter
		}
		Remote struct {
			Read stats.Counter
			Hit  stats.Counter
		}
		LRU struct {
			Evict             stats.Counter
			EvictWithZeroRead stats.Counter
		}
	}

	FileWithChecksum struct {
		Read            stats.Counter
		Write           stats.Counter
		UnderlyingRead  stats.Counter
		UnderlyingWrite stats.Counter
	}
}

type IterFieldsFunc

type IterFieldsFunc func(path []string, counter *stats.Counter) error

type TAECounterSet

type TAECounterSet struct {
	LogTail struct {
		Entries       stats.Counter
		InsertEntries stats.Counter
		DeleteEntries stats.Counter
	}

	CheckPoint struct {
		DoGlobalCheckPoint      stats.Counter
		DoIncrementalCheckpoint stats.Counter
		DeleteGlobalEntry       stats.Counter
		DeleteIncrementalEntry  stats.Counter
	}

	Object struct {
		Create              stats.Counter
		CreateNonAppendable stats.Counter
		SoftDelete          stats.Counter
		MergeBlocks         stats.Counter
		CompactBlock        stats.Counter
	}

	Block struct {
		Create              stats.Counter
		CreateNonAppendable stats.Counter
		SoftDelete          stats.Counter
		Flush               stats.Counter
	}
}

Jump to

Keyboard shortcuts

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