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

Commit1d603d7

Browse files
Apply suggestions from code review
Co-authored-by: Ethan <39577870+ethanndickson@users.noreply.github.com>
1 parent1e2df4d commit1d603d7

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

‎scaletest/notifications/metrics.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func NewMetrics(reg prometheus.Registerer) *Metrics {
2121
Namespace:"coderd",
2222
Subsystem:"scaletest",
2323
Name:"notification_delivery_latency_seconds",
24-
Help:"Time betweentest trigger and receipt of notification by client",
24+
Help:"Time betweennotification-creating action and receipt of notification by client",
2525
}, []string{"username","notification_type"})
2626
errors:=prometheus.NewCounterVec(prometheus.CounterOpts{
2727
Namespace:"coderd",

‎scaletest/notifications/run.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (r *Runner) Run(ctx context.Context, id string, logs io.Writer) error {
7373
codersdk.WithLogger(logger),
7474
codersdk.WithLogBodies())
7575

76-
logger.Info(ctx,fmt.Sprintf("user%qcreated",newUser.Username),slog.F("id",newUser.ID.String()))
76+
logger.Info(ctx,"user created",slog.F("username",newUser.Username),slog.F("user_id",newUser.ID.String()))
7777

7878
ifr.cfg.IsOwner {
7979
logger.Info(ctx,"assigning Owner role to user")
@@ -111,7 +111,7 @@ func (r *Runner) Run(ctx context.Context, id string, logs io.Writer) error {
111111
r.cfg.DialBarrier.Done()
112112
r.cfg.DialBarrier.Wait()
113113

114-
logger.Info(ctx,fmt.Sprintf("waitingup to %vfor notifications...",r.cfg.NotificationTimeout))
114+
logger.Info(ctx,fmt.Sprintf("waiting for notifications",slog.F("timeout",r.cfg.NotificationTimeout))
115115

116116
watchCtx,cancel:=context.WithTimeout(ctx,r.cfg.NotificationTimeout)
117117
defercancel()
@@ -224,7 +224,7 @@ func (r *Runner) watchNotifications(ctx context.Context, conn *websocket.Conn, u
224224
returnnil
225225
}
226226

227-
func (*Runner)readNotification(ctx context.Context,conn*websocket.Conn) (codersdk.GetInboxNotificationResponse,error) {
227+
readNotification(ctxcontext.Context,conn*websocket.Conn) (codersdk.GetInboxNotificationResponse,error) {
228228
_,message,err:=conn.Read(ctx)
229229
iferr!=nil {
230230
return codersdk.GetInboxNotificationResponse{},err

‎scaletest/notifications/run_test.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ func TestRun(t *testing.T) {
6666
require.NoError(t,err)
6767

6868
client:=coderdtest.New(t,&coderdtest.Options{
69-
IncludeProvisionerDaemon:true,
7069
Database:db,
7170
Pubsub:ps,
7271
NotificationsEnqueuer:enqueuer,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp