Skip to content

Comments

Set time unit on metrics.Timer#610

Merged
peterbourgon merged 2 commits intogo-kit:masterfrom
esenac:timer-unit
Sep 17, 2017
Merged

Set time unit on metrics.Timer#610
peterbourgon merged 2 commits intogo-kit:masterfrom
esenac:timer-unit

Conversation

@esenac
Copy link
Contributor

@esenac esenac commented Sep 15, 2017

Issue #608.

Copy link
Member

@peterbourgon peterbourgon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Couple of small things before I can merge. The CI failures look unrelated, I'll try to fix those.

metrics/timer.go Outdated
t.h.Observe(d)
}

// Unit sets the timer time unit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this a proper sentence with punctuation, and provide more detail, e.g.

Unit sets the unit of the float64 emitted by the timer. By default, the timer emits seconds.

}

func TestTimerUnit(t *testing.T) {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extraneous newline.

@esenac
Copy link
Contributor Author

esenac commented Sep 15, 2017

Thanks for your feedback @peterbourgon! I implemented the suggested changes, please have a further review.

@peterbourgon
Copy link
Member

Thanks! Test failures are unrelated.

@peterbourgon peterbourgon merged commit b5c889e into go-kit:master Sep 17, 2017
jamesgist pushed a commit to jamesgist/kit that referenced this pull request Nov 1, 2024
Set time unit on metrics.Timer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants