Skip to content

Commit

Permalink
fix: metrics of priority queue
Browse files Browse the repository at this point in the history
  • Loading branch information
shaofan-hs committed May 16, 2024
1 parent 296e196 commit 317e508
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metrics/priority_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ var (
Subsystem: PriorityQueueSubsystem,
Name: QueueLatencyKey,
Help: "How long in seconds an item stays in priority queue before being requested",
Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10),
Buckets: []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0,
1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 40, 50, 60},
}, []string{"name", "priority"})

workDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Subsystem: PriorityQueueSubsystem,
Name: WorkDurationKey,
Help: "How long in seconds processing an item from priority queue takes.",
Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10),
Buckets: []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0,
1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 40, 50, 60},
}, []string{"name", "priority"})

unfinished = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Expand Down

0 comments on commit 317e508

Please sign in to comment.