Documentation
¶
Overview ¶
Package stats provides statistics collection for the gokue job queue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector tracks queue activity without taking locks on the hot path using atomic operations.
func NewCollector ¶
func NewCollector() *Collector
NewCollector creates and returns a new Collector initialized with zero values.
func (*Collector) IncDropped ¶
func (c *Collector) IncDropped()
IncDropped increments the dropped counter.
func (*Collector) IncEnqueued ¶
func (c *Collector) IncEnqueued()
IncEnqueued increments the enqueued counter.
func (*Collector) IncFailed ¶
func (c *Collector) IncFailed()
IncFailed increments the failed counter.
func (*Collector) IncProcessed ¶
func (c *Collector) IncProcessed()
IncProcessed increments the processed counter.
func (*Collector) IncRetried ¶
func (c *Collector) IncRetried()
IncRetried increments the retried counter.
func (*Collector) IncRetryPredicatesFailed ¶
func (c *Collector) IncRetryPredicatesFailed()
IncRetryPredicatesFailed increments the retryPredicatesFailed counter
type Snapshot ¶
type Snapshot struct {
// Enqueued is the total number of jobs enqueued.
Enqueued uint64
// Processed is the total number of jobs successfully processed.
Processed uint64
// Failed is the total number of jobs that failed after all retries.
Failed uint64
// Retried is the total number of job retry attempts.
Retried uint64
// Dropped is the total number of jobs dropped.
Dropped uint64
// RetryPredicatesFailed is the total number of job that failed a retry predicate function.
RetryPredicatesFailed uint64
}
Snapshot represents a point-in-time capture of queue statistics.
Click to show internal directories.
Click to hide internal directories.