swaggest / rest

Web services with OpenAPI and JSON Schema done quick in Go
https://pkg.go.dev/github.com/swaggest/rest
MIT License
362 stars 17 forks source link

Update dependencies #49

Closed vearutop closed 2 years ago

github-actions[bot] commented 2 years ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
github-actions[bot] commented 2 years ago

API Changes

# summary
Inferred base version: v0.2.15
Suggested version: v0.3.0
github-actions[bot] commented 2 years ago

Unit Test Coverage

total: (statements) 82.4%

Coverage diff with base branch ```diff ```
codecov[bot] commented 2 years ago

Codecov Report

Merging #49 (2ff58eb) into master (948ff5d) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #49   +/-   ##
=======================================
  Coverage   74.65%   74.65%           
=======================================
  Files          26       26           
  Lines        1602     1602           
=======================================
  Hits         1196     1196           
  Misses        253      253           
  Partials      153      153           
Flag Coverage Δ
unittests 74.65% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 948ff5d...2ff58eb. Read the comment docs.

github-actions[bot] commented 2 years ago

Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 1.60µs ± 3% 1.59µs ± 3% ~ (p=0.841 n=5+5) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 851ns ± 4% 857ns ± 2% ~ (p=0.548 n=5+5) DecoderFunc_Decode-2 2.49µs ± 1% 2.52µs ± 3% ~ (p=0.548 n=5+5) Decoder_Decode_json-2 28.9µs ± 3% 28.5µs ± 1% ~ (p=0.310 n=5+5) Decoder_Decode_queryObject-2 5.90µs ± 1% 5.95µs ± 1% ~ (p=0.310 n=5+5) Decoder_Decode_jsonParam-2 2.13µs ± 1% 2.17µs ± 3% +1.78% (p=0.032 n=5+5) DecoderFactory_SetDecoderFunc-2 2.03µs ± 1% 2.06µs ± 2% +1.61% (p=0.032 n=5+5) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 13.8µs ± 2% 13.9µs ± 2% ~ (p=0.421 n=5+5) Middleware_control-2 4.03µs ± 1% 4.01µs ± 3% ~ (p=0.222 n=5+5) name old alloc/op new alloc/op delta pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 2.46kB ± 0% 2.46kB ± 0% ~ (all equal) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 440B ± 0% 440B ± 0% ~ (all equal) DecoderFunc_Decode-2 1.51kB ± 0% 1.51kB ± 0% ~ (all equal) Decoder_Decode_json-2 12.3kB ± 0% 12.3kB ± 0% ~ (all equal) Decoder_Decode_queryObject-2 2.00kB ± 0% 2.00kB ± 0% ~ (all equal) Decoder_Decode_jsonParam-2 736B ± 0% 736B ± 0% ~ (all equal) DecoderFactory_SetDecoderFunc-2 1.02kB ± 0% 1.02kB ± 0% ~ (all equal) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 1.14kB ± 2% 1.12kB ± 2% ~ (p=0.333 n=5+5) Middleware_control-2 11.2kB ± 0% 11.2kB ± 0% ~ (all equal) name old allocs/op new allocs/op delta pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 8.00 ± 0% 8.00 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 4.00 ± 0% 4.00 ± 0% ~ (all equal) DecoderFunc_Decode-2 12.0 ± 0% 12.0 ± 0% ~ (all equal) Decoder_Decode_json-2 172 ± 0% 172 ± 0% ~ (all equal) Decoder_Decode_queryObject-2 36.0 ± 0% 36.0 ± 0% ~ (all equal) Decoder_Decode_jsonParam-2 13.0 ± 0% 13.0 ± 0% ~ (all equal) DecoderFactory_SetDecoderFunc-2 16.0 ± 0% 16.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.0 ± 0% 11.0 ± 0% ~ (all equal) Middleware_control-2 9.00 ± 0% 9.00 ± 0% ~ (all equal) ```
Benchmark result ``` name time/op pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 1.59µs ± 3% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 857ns ± 2% DecoderFunc_Decode-2 2.52µs ± 3% Decoder_Decode_json-2 28.5µs ± 1% Decoder_Decode_queryObject-2 5.95µs ± 1% Decoder_Decode_jsonParam-2 2.17µs ± 3% DecoderFactory_SetDecoderFunc-2 2.06µs ± 2% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 13.9µs ± 2% Middleware_control-2 4.01µs ± 3% name alloc/op pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 2.46kB ± 0% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 440B ± 0% DecoderFunc_Decode-2 1.51kB ± 0% Decoder_Decode_json-2 12.3kB ± 0% Decoder_Decode_queryObject-2 2.00kB ± 0% Decoder_Decode_jsonParam-2 736B ± 0% DecoderFactory_SetDecoderFunc-2 1.02kB ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 1.12kB ± 2% Middleware_control-2 11.2kB ± 0% name allocs/op pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 8.00 ± 0% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 4.00 ± 0% DecoderFunc_Decode-2 12.0 ± 0% Decoder_Decode_json-2 172 ± 0% Decoder_Decode_queryObject-2 36.0 ± 0% Decoder_Decode_jsonParam-2 13.0 ± 0% DecoderFactory_SetDecoderFunc-2 16.0 ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.0 ± 0% Middleware_control-2 9.00 ± 0% ```
github-actions[bot] commented 2 years ago

Examples Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 37.8µs ± 8% 37.9µs ± 7% ~ (p=0.841 n=5+5) _directGzipHead-2 36.5µs ± 3% 35.3µs ± 6% ~ (p=0.151 n=5+5) _noDirectGzip-2 163µs ± 4% 167µs ± 3% ~ (p=0.222 n=5+5) _directGzip_decode-2 563µs ± 2% 559µs ± 4% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 160µs ± 2% 160µs ± 4% ~ (p=0.421 n=5+5) _jsonBody-2 66.5µs ± 5% 65.8µs ± 5% ~ (p=0.548 n=5+5) _jsonBodyValidation-2 69.8µs ± 5% 70.4µs ± 3% ~ (p=1.000 n=5+5) _outputHeaders-2 34.3µs ± 3% 35.1µs ± 6% ~ (p=0.222 n=5+5) _validation-2 67.0µs ± 9% 66.9µs ± 5% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 42.1µs ±11% 42.5µs ± 4% ~ (p=0.421 n=5+5) _ok-2 44.1µs ± 5% 43.8µs ± 4% ~ (p=0.841 n=5+5) _invalidBody-2 61.8µs ± 5% 60.8µs ± 3% ~ (p=0.841 n=5+5) name old B:rcvd/op new B:rcvd/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 639 ± 0% 639 ± 0% ~ (all equal) _directGzipHead-2 183 ± 0% 183 ± 0% ~ (all equal) _noDirectGzip-2 1.04k ± 0% 1.04k ± 0% ~ (all equal) _directGzip_decode-2 639 ± 0% 639 ± 0% ~ (all equal) _noDirectGzip_decode-2 1.04k ± 0% 1.04k ± 0% ~ (all equal) _jsonBody-2 208 ± 0% 208 ± 0% ~ (all equal) _jsonBodyValidation-2 194 ± 0% 194 ± 0% ~ (all equal) _outputHeaders-2 155 ± 0% 155 ± 0% ~ (all equal) _validation-2 177 ± 0% 177 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 337 ± 0% 337 ± 0% ~ (all equal) _ok-2 359 ± 0% 359 ± 0% ~ (all equal) _invalidBody-2 435 ± 0% 435 ± 0% ~ (all equal) name old B:sent/op new B:sent/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 103 ± 0% 103 ± 0% ~ (all equal) _directGzipHead-2 104 ± 0% 104 ± 0% ~ (all equal) _noDirectGzip-2 117 ± 0% 117 ± 0% ~ (all equal) _directGzip_decode-2 116 ± 0% 116 ± 0% ~ (all equal) _noDirectGzip_decode-2 130 ± 0% 130 ± 0% ~ (all equal) _jsonBody-2 188 ± 0% 188 ± 0% ~ (all equal) _jsonBodyValidation-2 192 ± 0% 192 ± 0% ~ (all equal) _outputHeaders-2 77.0 ± 0% 77.0 ± 0% ~ (all equal) _validation-2 170 ± 0% 170 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 74.0 ± 0% 74.0 ± 0% ~ (all equal) _ok-2 74.0 ± 0% 74.0 ± 0% ~ (all equal) _invalidBody-2 137 ± 0% 137 ± 0% ~ (all equal) name old rps new rps delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 26.5k ± 7% 26.4k ± 7% ~ (p=0.841 n=5+5) _directGzipHead-2 27.4k ± 3% 28.4k ± 6% ~ (p=0.151 n=5+5) _noDirectGzip-2 6.14k ± 4% 5.98k ± 3% ~ (p=0.222 n=5+5) _directGzip_decode-2 1.78k ± 2% 1.79k ± 4% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 6.25k ± 2% 6.27k ± 4% ~ (p=0.421 n=5+5) _jsonBody-2 15.0k ± 5% 15.2k ± 5% ~ (p=0.548 n=5+5) _jsonBodyValidation-2 14.3k ± 5% 14.2k ± 3% ~ (p=1.000 n=5+5) _outputHeaders-2 29.2k ± 3% 28.5k ± 6% ~ (p=0.222 n=5+5) _validation-2 15.0k ± 9% 15.0k ± 5% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 23.9k ±10% 23.6k ± 4% ~ (p=0.421 n=5+5) _ok-2 22.7k ± 6% 22.8k ± 4% ~ (p=0.841 n=5+5) _invalidBody-2 16.2k ± 5% 16.4k ± 3% ~ (p=0.690 n=5+5) name old alloc/op new alloc/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 3.87kB ± 0% 3.87kB ± 0% ~ (p=0.413 n=5+5) _directGzipHead-2 3.87kB ± 0% 3.87kB ± 0% ~ (p=1.000 n=5+5) _noDirectGzip-2 6.33kB ±20% 6.82kB ±23% ~ (p=0.690 n=5+5) _directGzip_decode-2 402kB ± 0% 402kB ± 0% ~ (p=0.341 n=5+5) _noDirectGzip_decode-2 5.15kB ± 4% 5.14kB ± 5% ~ (p=1.000 n=5+5) _jsonBody-2 13.2kB ± 0% 13.2kB ± 0% ~ (p=0.984 n=5+5) _jsonBodyValidation-2 18.2kB ± 0% 18.2kB ± 0% ~ (p=0.119 n=5+5) _outputHeaders-2 3.64kB ± 0% 3.64kB ± 0% ~ (p=1.000 n=5+5) _validation-2 16.2kB ± 0% 16.2kB ± 0% -0.09% (p=0.016 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 4.82kB ± 0% 4.81kB ± 0% -0.13% (p=0.008 n=5+5) _ok-2 4.73kB ± 0% 4.72kB ± 0% -0.19% (p=0.029 n=4+4) _invalidBody-2 8.71kB ± 4% 8.69kB ± 4% ~ (p=0.310 n=5+5) name old allocs/op new allocs/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 40.0 ± 0% 40.0 ± 0% ~ (all equal) _directGzipHead-2 40.0 ± 0% 40.0 ± 0% ~ (all equal) _noDirectGzip-2 47.8 ± 4% 48.2 ± 5% ~ (p=1.000 n=5+5) _directGzip_decode-2 497 ± 0% 497 ± 0% ~ (all equal) _noDirectGzip_decode-2 48.0 ± 0% 48.0 ± 0% ~ (all equal) _jsonBody-2 124 ± 0% 124 ± 0% ~ (all equal) _jsonBodyValidation-2 144 ± 0% 144 ± 0% ~ (all equal) _outputHeaders-2 35.0 ± 0% 35.0 ± 0% ~ (all equal) _validation-2 131 ± 0% 131 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 52.0 ± 0% 52.0 ± 0% ~ (all equal) _ok-2 48.0 ± 0% 48.0 ± 0% ~ (all equal) _invalidBody-2 98.0 ± 0% 98.0 ± 0% ~ (all equal) ```