Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitad7f470

Browse files
committed
Only measure dispatch time
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent093e86b commitad7f470

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎coderd/notifications/notifier.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ func (n *notifier) deliver(ctx context.Context, msg database.AcquireNotification
210210

211211
start:=time.Now()
212212
retryable,err:=deliver(ctx,msg.ID)
213+
n.metrics.DispatcherSendSeconds.WithLabelValues(string(n.method)).Observe(time.Since(start).Seconds())
214+
213215
iferr!=nil {
214216
// Don't try to accumulate message responses if the context has been canceled.
215217
//
@@ -241,7 +243,6 @@ func (n *notifier) deliver(ctx context.Context, msg database.AcquireNotification
241243
success<-n.newSuccessfulDispatch(msg)
242244
}
243245
}
244-
n.metrics.DispatcherSendSeconds.WithLabelValues(string(n.method)).Observe(time.Since(start).Seconds())
245246
n.metrics.PendingUpdates.Set(float64(len(success)+len(failure)))
246247

247248
returnnil

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp