Duration takes a time.Duration -- the time to complete the indicated operation -- and submits it to statsd. The last parameter is an arbitrary array of tags as maps.
(ctx context.Context, n time.Duration, ts ...Tags)
| 15 | // |
| 16 | // The last parameter is an arbitrary array of tags as maps. |
| 17 | func (t *Timer) Duration(ctx context.Context, n time.Duration, ts ...Tags) { |
| 18 | tags := getStatsTags(ctx, ts...) |
| 19 | warnIfError(ctx, currentBackend.Distribution(ctx, t.Name, n.Seconds()*1000, tags, t.Rate.Rate())) |
| 20 | } |
| 21 | |
| 22 | // Time runs a function, timing its execution, and submits the resulting |
| 23 | // duration to statsd. |
no test coverage detected