statistics

package
v0.18.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExportedStatistics

type ExportedStatistics struct {
	// Events stores statistics about processing events
	Events QueueStats `mapstructure:"events"`
	// Buffers stores statistics about processing buffers
	Buffers QueueStats `mapstructure:"buffers"`
	// Transfer stores statistics about data transfers
	Transfer TransferStats `mapstructure:"transfer"`
	// Sessions stores statistics about sessions
	Sessions SessionsStats `mapstructure:"sessions"`
}

ExportedStatistics store statistics related to the library execution These are statistics from the beginning of the processing

type QueueStats

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

QueueStats stores statistics related to the queue processing

func (QueueStats) Broken

func (stats QueueStats) Broken() uint64

Broken is number of items that has been damaged by queue, should be zero

func (QueueStats) Dropped

func (stats QueueStats) Dropped() uint64

Dropped is number of items that has been dropped since they couldn't be processed

func (QueueStats) Enqueued

func (stats QueueStats) Enqueued() uint64

Enqueued is number of items that has been accepted for processing

func (QueueStats) Processed

func (stats QueueStats) Processed() uint64

Processed is number of items that has been successfully processed

func (QueueStats) ProcessingTime

func (stats QueueStats) ProcessingTime() time.Duration

ProcessingTime is duration of the processing

func (QueueStats) SuccessRate

func (stats QueueStats) SuccessRate() float64

SuccessRate of items processing (Processed - Dropped - Broken) / Processed

func (QueueStats) Waiting

func (stats QueueStats) Waiting() uint64

Waiting is number of items that are waiting for being processed Enqueued - Processed - Dropped - Broken

type SessionsStats added in v0.18.0

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

SessionsStats stores statistics related to sessions.

func (SessionsStats) SessionsActive added in v0.18.0

func (stats SessionsStats) SessionsActive() uint64

SessionsActive is the number of active sessions

func (SessionsStats) SessionsClosed added in v0.18.0

func (stats SessionsStats) SessionsClosed() uint64

SessionsClosed is the number of closed sessions

func (SessionsStats) SessionsOpened added in v0.18.0

func (stats SessionsStats) SessionsOpened() uint64

SessionsOpened is the number of opened sessions

type Statistics

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

Statistics related to data processing

func NewStatistics

func NewStatistics(config *meter_config.MeterConfig, logger *zap.Logger) (*Statistics, error)

NewStatistics creates structure to keep track of data processing. If meter is not nil, then Open Telemetry is used for collecting metrics as well.

func (*Statistics) BuffersBroken

func (stats *Statistics) BuffersBroken() uint64

func (*Statistics) BuffersBrokenAdd

func (stats *Statistics) BuffersBrokenAdd(i uint64)

func (*Statistics) BuffersDropped

func (stats *Statistics) BuffersDropped() uint64

func (*Statistics) BuffersDroppedAdd

func (stats *Statistics) BuffersDroppedAdd(i uint64)

func (*Statistics) BuffersEnqueued

func (stats *Statistics) BuffersEnqueued() uint64

func (*Statistics) BuffersEnqueuedAdd

func (stats *Statistics) BuffersEnqueuedAdd(i uint64)

func (*Statistics) BuffersProcessed

func (stats *Statistics) BuffersProcessed() uint64

func (*Statistics) BuffersProcessedAdd

func (stats *Statistics) BuffersProcessedAdd(i uint64)

func (*Statistics) BytesAPIAccepted

func (stats *Statistics) BytesAPIAccepted() uint64

func (*Statistics) BytesAPIAcceptedAdd

func (stats *Statistics) BytesAPIAcceptedAdd(i uint64)

func (*Statistics) BytesAPISent

func (stats *Statistics) BytesAPISent() uint64

func (*Statistics) BytesAPISentAdd

func (stats *Statistics) BytesAPISentAdd(i uint64)

func (*Statistics) EventsBroken

func (stats *Statistics) EventsBroken() uint64

func (*Statistics) EventsBrokenAdd

func (stats *Statistics) EventsBrokenAdd(i uint64)

func (*Statistics) EventsDropped

func (stats *Statistics) EventsDropped() uint64

func (*Statistics) EventsDroppedAdd

func (stats *Statistics) EventsDroppedAdd(i uint64)

func (*Statistics) EventsEnqueued

func (stats *Statistics) EventsEnqueued() uint64

func (*Statistics) EventsEnqueuedAdd

func (stats *Statistics) EventsEnqueuedAdd(i uint64)

func (*Statistics) EventsProcessed

func (stats *Statistics) EventsProcessed() uint64

func (*Statistics) EventsProcessedAdd

func (stats *Statistics) EventsProcessedAdd(i uint64)

func (*Statistics) Export

func (stats *Statistics) Export(processingDur time.Duration) *ExportedStatistics

Export exports statistics related to the processing

func (*Statistics) PayloadSizeRecord

func (stats *Statistics) PayloadSizeRecord(payloadSizeInBytes int64)

func (*Statistics) ResponseTimeRecord

func (stats *Statistics) ResponseTimeRecord(duration time.Duration)

func (*Statistics) SessionsClosed added in v0.18.0

func (stats *Statistics) SessionsClosed() uint64

func (*Statistics) SessionsClosedAdd added in v0.18.0

func (stats *Statistics) SessionsClosedAdd(i uint64)

func (*Statistics) SessionsOpened added in v0.18.0

func (stats *Statistics) SessionsOpened() uint64

func (*Statistics) SessionsOpenedAdd added in v0.18.0

func (stats *Statistics) SessionsOpenedAdd(i uint64)

type TransferStats

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

TransferStats stores statistics related to the data transfers

func (TransferStats) AvgBufferBytes

func (stats TransferStats) AvgBufferBytes() float64

AvgBufferBytes is average buffer size in bytes - BytesAccepted / BuffersProcessed

func (TransferStats) BuffersProcessed

func (stats TransferStats) BuffersProcessed() uint64

BuffersProcessed is number of processed buffers

func (TransferStats) BytesAccepted

func (stats TransferStats) BytesAccepted() uint64

BytesAccepted is the amount of MB that were accepted by the server retries are not counted

func (TransferStats) BytesSent

func (stats TransferStats) BytesSent() uint64

BytesSent is the amount of bytes that were sent to the server each retry is counted

func (TransferStats) ProcessingTime

func (stats TransferStats) ProcessingTime() time.Duration

ProcessingTime is duration of the processing

func (TransferStats) SuccessRate

func (stats TransferStats) SuccessRate() float64

SuccessRate of the transfer - BytesAccepted / BytesSent

func (TransferStats) ThroughputBpS

func (stats TransferStats) ThroughputBpS() float64

ThroughputBpS is the throughput based on BytesAccepted

Jump to

Keyboard shortcuts

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