diff --git a/go.mod b/go.mod index ff6350f..d65645c 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/go-chi/chi/v5 v5.0.7 github.com/go-chi/render v1.0.1 github.com/go-pkgz/lgr v0.10.4 - github.com/go-pkgz/rest v1.15.2 + github.com/go-pkgz/rest v1.15.3 github.com/jessevdk/go-flags v1.5.0 github.com/lithammer/shortuuid/v4 v4.0.0 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 4760588..e730d3f 100644 --- a/go.sum +++ b/go.sum @@ -17,6 +17,8 @@ github.com/go-pkgz/lgr v0.10.4 h1:l7qyFjqEZgwRgaQQSEp6tve4A3OU80VrfzpvtEX8ngw= github.com/go-pkgz/lgr v0.10.4/go.mod h1:CD0s1z6EFpIUplV067gitF77tn25JItzwHNKAPqeCF0= github.com/go-pkgz/rest v1.15.2 h1:e+yaHlD6la+UKbsdI1Eh9DD/ZGykv/FxaeH8JBEanHk= github.com/go-pkgz/rest v1.15.2/go.mod h1:KUWAqbDteYGS/CiXftomQsKjtEOifXsJ36Ka0skYbmk= +github.com/go-pkgz/rest v1.15.3 h1:j+Cl5KL0ped09wpp8blqK9wpxR/xjbRzOBLunc1K8sw= +github.com/go-pkgz/rest v1.15.3/go.mod h1:KUWAqbDteYGS/CiXftomQsKjtEOifXsJ36Ka0skYbmk= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= diff --git a/vendor/github.com/go-pkgz/rest/README.md b/vendor/github.com/go-pkgz/rest/README.md index 391dafc..0de9ec9 100644 --- a/vendor/github.com/go-pkgz/rest/README.md +++ b/vendor/github.com/go-pkgz/rest/README.md @@ -123,7 +123,7 @@ a request does not satisfy the maybeFn logic. Benchmarks middleware allows to measure the time of request handling, number of request per second and report aggregated metrics. This middleware keeps track of the request in the memory and keep up to 900 points (15 minutes, data-point per second). -In order to retrieve the data user should call `Stats(d duration)` method. duration is the time window for which the benchmark data should be returned. It can be any duration from 1s to 15m. +In order to retrieve the data user should call `Stats(d duration)` method. duration is the time window for which the benchmark data should be returned. It can be any duration from 1s to 15m. Note: all the time data is in microseconds. ## Helpers diff --git a/vendor/github.com/go-pkgz/rest/benchmarks.go b/vendor/github.com/go-pkgz/rest/benchmarks.go index 4904567..23d21fd 100644 --- a/vendor/github.com/go-pkgz/rest/benchmarks.go +++ b/vendor/github.com/go-pkgz/rest/benchmarks.go @@ -139,8 +139,8 @@ func (b *Benchmarks) Stats(interval time.Duration) BenchmarkStats { return BenchmarkStats{ Requests: requests, RequestsSec: float64(requests) / (fnInterval.Sub(stInterval).Seconds()), - AverageRespTime: respTime.Milliseconds() / int64(requests), - MinRespTime: minRespTime.Milliseconds(), - MaxRespTime: maxRespTime.Milliseconds(), + AverageRespTime: respTime.Microseconds() / int64(requests), + MinRespTime: minRespTime.Microseconds(), + MaxRespTime: maxRespTime.Microseconds(), } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 60b5765..3ee2607 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -23,7 +23,7 @@ github.com/go-pkgz/expirable-cache # github.com/go-pkgz/lgr v0.10.4 ## explicit; go 1.15 github.com/go-pkgz/lgr -# github.com/go-pkgz/rest v1.15.2 +# github.com/go-pkgz/rest v1.15.3 ## explicit; go 1.16 github.com/go-pkgz/rest github.com/go-pkgz/rest/logger