Skip to content

Set time unit on metrics.Timer - #610

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

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

Conversation

@esenac

@esenac esenac commented Sep 15, 2017

Copy link
Copy Markdown
Contributor

Issue #608.

@peterbourgon peterbourgon left a comment

Copy link
Copy Markdown
Member

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.

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

// Unit sets the timer time unit

Copy link
Copy Markdown
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.

Comment thread metrics/timer_test.go Outdated
}

func TestTimerUnit(t *testing.T) {

Copy link
Copy Markdown
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

esenac commented Sep 15, 2017

Copy link
Copy Markdown
Contributor Author

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

@peterbourgon

Copy link
Copy Markdown
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