Skip to content

Commit 7189668

Browse files
craig[bot]stevendanna
andcommitted
Merge #156939
156939: gossip: fix gossip.callbacks.pending_duration time metric r=pav-kv a=stevendanna In 32723e5 I reversed this subtraction somehow. Release note (bug fix): Fix bug that could result in incorrect gossip.callbacks.pending_duration metric value being recorded. Co-authored-by: Steven Danna <danna@cockroachlabs.com>
2 parents 5b5000c + 73664da commit 7189668

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/gossip/infostore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ func (is *infoStore) launchCallbackWorker(ambient log.AmbientContext, cw *callba
272272
// metrics accordingly.
273273
afterQueue := crtime.NowMono()
274274
for _, work := range wq {
275-
queueDur := work.schedulingTime.Sub(afterQueue)
275+
queueDur := afterQueue.Sub(work.schedulingTime)
276276
is.metrics.CallbacksPending.Dec(1)
277277
if queueDur >= minCallbackDurationToRecord {
278278
is.metrics.CallbacksPendingDuration.RecordValue(queueDur.Nanoseconds())

0 commit comments

Comments
 (0)