metricsutil

package
v0.10.3-0...-96d0e78 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocateTimeTickMetricsGuard

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

AllocateTimeTickMetricsGuard is a guard for allocate time tick metrics.

func (*AllocateTimeTickMetricsGuard) Done

func (g *AllocateTimeTickMetricsGuard) Done(ts uint64, err error)

Done finishes the allocate time tick metrics.

type AppendMetrics

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

AppendMetrics is the metrics for append operation.

func (*AppendMetrics) Done

func (m *AppendMetrics) Done(result *types.AppendResult, err error)

Done push the metrics.

func (*AppendMetrics) IntoLogFields

func (m *AppendMetrics) IntoLogFields() []zap.Field

IntoLogFields convert the metrics to log fields.

func (*AppendMetrics) RangeOverInterceptors

func (m *AppendMetrics) RangeOverInterceptors(f func(name string, ims []*InterceptorMetrics))

RangeOverInterceptors range over the interceptors.

func (*AppendMetrics) StartAppendGuard

func (m *AppendMetrics) StartAppendGuard() *AppendMetricsGuard

StartAppendGuard start the append operation.

func (*AppendMetrics) StartInterceptorCollector

func (m *AppendMetrics) StartInterceptorCollector(name string) *InterceptorCollectGuard

StartInterceptorCollector start the interceptor to collect the duration.

type AppendMetricsGuard

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

func (*AppendMetricsGuard) FinishAppend

func (m *AppendMetricsGuard) FinishAppend()

FinishAppend finish the append operation.

func (*AppendMetricsGuard) FinishWALImplAppend

func (m *AppendMetricsGuard) FinishWALImplAppend()

FinishImplAppend finish the implementation append operation.

func (*AppendMetricsGuard) StartWALImplAppend

func (m *AppendMetricsGuard) StartWALImplAppend()

StartWALImplAppend start the implementation append operation.

type GrowingSegmentState

type GrowingSegmentState string

type InterceptorCollectGuard

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

InterceptorCollectGuard is used to collect the metrics of interceptor.

func (*InterceptorCollectGuard) AfterDone

func (g *InterceptorCollectGuard) AfterDone()

AfterDone mark the after append operation is done.

func (*InterceptorCollectGuard) AfterStart

func (g *InterceptorCollectGuard) AfterStart()

AfterStart mark the after append operation is started.

func (*InterceptorCollectGuard) BeforeDone

func (g *InterceptorCollectGuard) BeforeDone()

BeforeDone mark the before append operation is done.

func (*InterceptorCollectGuard) BeforeFailure

func (g *InterceptorCollectGuard) BeforeFailure(err error)

BeforeFailure mark the operation before append is failed.

type InterceptorMetrics

type InterceptorMetrics struct {
	Before    time.Duration
	BeforeErr error
	After     time.Duration
}

func (*InterceptorMetrics) String

func (im *InterceptorMetrics) String() string

type ScanMetrics

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

func NewScanMetrics

func NewScanMetrics(pchannel types.PChannelInfo) *ScanMetrics

func (*ScanMetrics) Close

func (m *ScanMetrics) Close()

Close closes the metrics.

func (*ScanMetrics) NewScannerMetrics

func (m *ScanMetrics) NewScannerMetrics() *ScannerMetrics

NewScannerMetrics creates a new scanner metrics.

func (*ScanMetrics) ObserveAutoCommitTxn

func (m *ScanMetrics) ObserveAutoCommitTxn()

ObserveAutoCommitTxn observes the auto commit txn.

func (*ScanMetrics) ObserveErrorTxn

func (m *ScanMetrics) ObserveErrorTxn()

ObserveErrorTxn observes the error txn.

func (*ScanMetrics) ObserveExpiredTxn

func (m *ScanMetrics) ObserveExpiredTxn()

ObserveExpiredTxn observes the expired txn.

func (*ScanMetrics) ObserveTxn

func (m *ScanMetrics) ObserveTxn(state message.TxnState)

ObserveTxn observes the txn.

type ScannerMetrics

type ScannerMetrics struct {
	*ScanMetrics
	// contains filtered or unexported fields
}

func (*ScannerMetrics) Close

func (m *ScannerMetrics) Close()

func (*ScannerMetrics) ObserveMessage

func (m *ScannerMetrics) ObserveMessage(tailing bool, msgType message.MessageType, bytes int)

ObserveMessage observes the message.

func (*ScannerMetrics) ObservePassedMessage

func (m *ScannerMetrics) ObservePassedMessage(tailing bool, msgType message.MessageType, bytes int)

ObservePassedMessage observes the filtered message.

func (*ScannerMetrics) ObserveTimeTickViolation

func (m *ScannerMetrics) ObserveTimeTickViolation(tailing bool, msgType message.MessageType)

ObserveTimeTickViolation observes the time tick violation.

func (*ScannerMetrics) SwitchModel

func (m *ScannerMetrics) SwitchModel(s string)

SwitchModel switches the scanner model.

func (*ScannerMetrics) UpdatePendingQueueSize

func (m *ScannerMetrics) UpdatePendingQueueSize(size int)

func (*ScannerMetrics) UpdateTimeTickBufSize

func (m *ScannerMetrics) UpdateTimeTickBufSize(size int)

func (*ScannerMetrics) UpdateTxnBufSize

func (m *ScannerMetrics) UpdateTxnBufSize(size int)

type SegmentAssignMetrics

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

SegmentAssignMetrics is the metrics of the segment assignment.

func NewSegmentAssignMetrics

func NewSegmentAssignMetrics(pchannel string) *SegmentAssignMetrics

func (*SegmentAssignMetrics) Close

func (m *SegmentAssignMetrics) Close()

func (*SegmentAssignMetrics) ObserveCreateSegment

func (m *SegmentAssignMetrics) ObserveCreateSegment()

ObserveCreateSegment increments the total number of growing segment.

func (*SegmentAssignMetrics) ObserveDelete

func (m *SegmentAssignMetrics) ObserveDelete(rows uint64)

ObserveDelete observe a insert operation

func (*SegmentAssignMetrics) ObserveInsert

func (m *SegmentAssignMetrics) ObserveInsert(rows uint64, bytes uint64)

ObserveInsert observe a insert operation

func (*SegmentAssignMetrics) ObserveOnAllocating

func (m *SegmentAssignMetrics) ObserveOnAllocating() func()

ObserveOnAllocating observe a allocating operation and return a guard function.

func (*SegmentAssignMetrics) ObserveSegmentFlushed

func (m *SegmentAssignMetrics) ObserveSegmentFlushed(policy string, rows int64, bytes int64)

ObserveSegmentFlushed records the number of bytes flushed and increments the total number of flushed segments.

func (*SegmentAssignMetrics) ObseveOnFlushing

func (m *SegmentAssignMetrics) ObseveOnFlushing() func()

ObserveOnFlushing observe a flush operation and return a guard function.

func (*SegmentAssignMetrics) UpdateCollectionCount

func (m *SegmentAssignMetrics) UpdateCollectionCount(cnt int)

func (*SegmentAssignMetrics) UpdatePartitionCount

func (m *SegmentAssignMetrics) UpdatePartitionCount(cnt int)

func (*SegmentAssignMetrics) UpdateSegmentCount

func (m *SegmentAssignMetrics) UpdateSegmentCount(cnt int)

type TimeTickMetrics

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

TimeTickMetrics is the metrics for time tick.

func NewTimeTickMetrics

func NewTimeTickMetrics(pchannel string) *TimeTickMetrics

NewTimeTickMetrics creates a new time tick metrics.

func (*TimeTickMetrics) Close

func (m *TimeTickMetrics) Close()

func (*TimeTickMetrics) CountAcknowledgeTimeTick

func (m *TimeTickMetrics) CountAcknowledgeTimeTick(isSync bool)

func (*TimeTickMetrics) CountSyncTimeTick

func (m *TimeTickMetrics) CountSyncTimeTick(isSync bool)

func (*TimeTickMetrics) CountTimeTickSync

func (m *TimeTickMetrics) CountTimeTickSync(ts uint64, persist bool)

func (*TimeTickMetrics) StartAllocateTimeTick

func (m *TimeTickMetrics) StartAllocateTimeTick() *AllocateTimeTickMetricsGuard

StartAllocateTimeTick starts to allocate time tick.

func (*TimeTickMetrics) UpdateLastConfirmedTimeTick

func (m *TimeTickMetrics) UpdateLastConfirmedTimeTick(ts uint64)

type TxnMetrics

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

func NewTxnMetrics

func NewTxnMetrics(pchannel string) *TxnMetrics

func (*TxnMetrics) BeginTxn

func (m *TxnMetrics) BeginTxn() *TxnMetricsGuard

func (*TxnMetrics) Close

func (m *TxnMetrics) Close()

type TxnMetricsGuard

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

func (*TxnMetricsGuard) Done

func (g *TxnMetricsGuard) Done(state message.TxnState)

type WriteAheadBufferMetrics

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

func NewWriteAheadBufferMetrics

func NewWriteAheadBufferMetrics(
	pchannel string,
	capacity int,
) *WriteAheadBufferMetrics

NewWriteAheadBufferMetrics creates a new WriteAheadBufferMetrics.

func (*WriteAheadBufferMetrics) Close

func (m *WriteAheadBufferMetrics) Close()

func (*WriteAheadBufferMetrics) Observe

func (m *WriteAheadBufferMetrics) Observe(
	total int,
	bytes int,
	earilestTimeTick uint64,
	latestTimeTick uint64,
)

type WriteMetrics

type WriteMetrics struct {
	log.Binder
	// contains filtered or unexported fields
}

func NewWriteMetrics

func NewWriteMetrics(pchannel types.PChannelInfo, walName message.WALName) *WriteMetrics

NewWriteMetrics creates a new WriteMetrics.

func (*WriteMetrics) Close

func (m *WriteMetrics) Close()

func (*WriteMetrics) ObserveRetry

func (m *WriteMetrics) ObserveRetry()

ObserveRetry observes the retry of the walimpls.

func (*WriteMetrics) StartAppend

func (m *WriteMetrics) StartAppend(msg message.MutableMessage) *AppendMetrics

Jump to

Keyboard shortcuts

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