swaggest / rest

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

Fix "default" decoder #168

Closed vearutop closed 10 months ago

github-actions[bot] commented 10 months ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 110 8183 (+5) 5931 (+4) 566 1686 (+1) 998 198.9K (+50B)
Go (test) 53 6321 (+13) 4844 (+10) 291 1186 (+3) 186 174.3K (+297B)
github-actions[bot] commented 10 months ago

Go API Changes

# summary
Inferred base version: v0.2.56
Suggested version: v0.2.57
github-actions[bot] commented 10 months ago

Unit Test Coverage

total: (statements) 81.5% changed lines: (statements) 100.0%

Coverage of changed lines | File | Function | Coverage | |--------------------------|-------------------|----------| | Total | | 100.0% | | chirouter/wrapper.go | | 100.0% | | chirouter/wrapper.go:210 | prepareHandler | 100.0% | | nethttp/wrap.go | | 100.0% | | nethttp/wrap.go:14 | WrapHandler | 100.0% | | request/middleware.go | | 100.0% | | request/middleware.go:20 | DecoderMiddleware | 100.0% | | web/service.go | | 100.0% | | web/service.go:130 | Get | 100.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |------------------------------------------------|-------------------|---------------|------------------| | Total | | 81.4% | 81.5% (+0.1%) | | github.com/swaggest/rest/nethttp/wrap.go | WrapHandler | 83.3% | 87.5% (+4.2%) | | github.com/swaggest/rest/request/middleware.go | DecoderMiddleware | 92.3% | 93.3% (+1.0%) |
codecov[bot] commented 10 months ago

Codecov Report

Merging #168 (fabc396) into master (2aad83f) will increase coverage by 0.05%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #168      +/-   ##
==========================================
+ Coverage   76.62%   76.68%   +0.05%     
==========================================
  Files          30       30              
  Lines        1673     1677       +4     
==========================================
+ Hits         1282     1286       +4     
  Misses        284      284              
  Partials      107      107              
Flag Coverage Δ
unittests 76.68% <100.00%> (+0.05%) :arrow_up:

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

Files Changed Coverage Δ
chirouter/wrapper.go 100.00% <100.00%> (ø)
nethttp/wrap.go 61.76% <100.00%> (+2.38%) :arrow_up:
request/middleware.go 88.37% <100.00%> (ø)
web/service.go 84.78% <100.00%> (+0.33%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

github-actions[bot] commented 10 months 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.34µs ± 1% 1.36µs ± 1% +1.17% (p=0.009 n=6+5) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 671ns ± 0% 668ns ± 0% -0.49% (p=0.032 n=5+5) DecoderFunc_Decode-2 1.98µs ± 3% 1.99µs ± 2% ~ (p=0.937 n=6+6) Decoder_Decode_json-2 23.3µs ± 1% 23.3µs ± 0% ~ (p=0.558 n=6+6) Decoder_Decode_queryObject-2 5.30µs ± 0% 5.28µs ± 0% -0.40% (p=0.026 n=6+6) Decoder_Decode_jsonParam-2 1.96µs ± 0% 1.95µs ± 0% -0.44% (p=0.008 n=5+5) DecoderFactory_SetDecoderFunc-2 1.69µs ± 0% 1.69µs ± 0% ~ (p=0.130 n=6+5) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.5µs ± 2% 11.4µs ± 0% ~ (p=0.398 n=6+5) Middleware_control-2 3.32µs ± 1% 3.30µs ± 0% ~ (p=0.225 n=6+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.2kB ± 0% 12.2kB ± 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.16kB ± 5% 1.15kB ± 5% ~ (p=0.515 n=6+6) 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 177 ± 0% 177 ± 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.36µs ± 1% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 668ns ± 0% DecoderFunc_Decode-2 1.99µs ± 2% Decoder_Decode_json-2 23.3µs ± 0% Decoder_Decode_queryObject-2 5.28µs ± 0% Decoder_Decode_jsonParam-2 1.95µs ± 0% DecoderFactory_SetDecoderFunc-2 1.69µs ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.4µs ± 0% Middleware_control-2 3.30µs ± 0% 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.2kB ± 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.15kB ± 5% 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 177 ± 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 10 months 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 55.8µs ±53% 49.6µs ±49% ~ (p=0.889 n=5+5) _directGzipHead-2 39.5µs ± 5% 39.6µs ± 5% ~ (p=0.841 n=5+5) _noDirectGzip-2 180µs ± 3% 184µs ± 2% ~ (p=0.151 n=5+5) _directGzip_decode-2 621µs ± 2% 651µs ± 2% +4.93% (p=0.008 n=5+5) _noDirectGzip_decode-2 182µs ± 1% 183µs ± 3% ~ (p=0.841 n=5+5) _jsonBody-2 78.6µs ± 4% 79.8µs ± 3% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 87.2µs ± 5% 91.3µs ± 5% ~ (p=0.095 n=5+5) _outputHeaders-2 41.3µs ± 2% 42.7µs ± 3% +3.48% (p=0.032 n=5+5) _requestResponseMapping-2 81.8µs ± 9% 80.2µs ± 4% ~ (p=1.000 n=5+5) _validation-2 87.0µs ± 4% 86.0µs ± 3% ~ (p=0.690 n=5+5) _noValidation-2 63.5µs ± 3% 61.9µs ± 3% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 43.1µs ± 7% 40.2µs ± 0% ~ (p=0.190 n=5+4) _directGzipHead-2 41.6µs ± 2% 41.4µs ± 1% ~ (p=0.690 n=5+5) _noDirectGzip-2 185µs ± 3% 183µs ± 2% ~ (p=0.548 n=5+5) _directGzip_decode-2 658µs ± 8% 646µs ± 4% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 186µs ± 2% 185µs ± 2% ~ (p=0.841 n=5+5) _htmlResponse-2 70.1µs ± 4% 67.6µs ± 4% ~ (p=0.056 n=5+5) _jsonBodyManual-2 51.1µs ± 2% 51.0µs ± 3% ~ (p=1.000 n=5+5) _jsonBody-2 72.8µs ± 2% 72.4µs ± 3% ~ (p=0.841 n=5+5) _jsonBodyValidation-2 89.9µs ± 3% 91.1µs ± 6% ~ (p=0.310 n=5+5) _outputHeaders-2 68.7µs ± 3% 69.0µs ± 4% ~ (p=0.690 n=5+5) _requestResponseMapping-2 77.5µs ± 2% 79.6µs ± 3% ~ (p=0.095 n=5+5) _validation-2 84.4µs ± 3% 84.2µs ± 3% ~ (p=0.841 n=5+5) _noValidation-2 63.6µs ± 2% 63.1µs ± 1% ~ (p=0.421 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 44.6µs ± 9% 43.8µs ± 4% ~ (p=0.421 n=5+5) _ok-2 43.7µs ± 1% 46.2µs ±18% ~ (p=0.690 n=5+5) _invalidBody-2 63.9µs ± 1% 65.3µs ± 4% ~ (p=0.056 n=5+5) name old 50%:ms new 50%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 2.31 ±29% 2.09 ±20% ~ (p=0.548 n=5+5) _directGzipHead-2 1.80 ± 0% 1.84 ± 3% ~ (p=0.444 n=4+5) _noDirectGzip-2 8.43 ± 6% 8.54 ± 4% ~ (p=0.421 n=5+5) _directGzip_decode-2 23.3 ± 8% 25.6 ± 3% +10.11% (p=0.016 n=5+5) _noDirectGzip_decode-2 8.75 ± 3% 8.62 ±10% ~ (p=0.278 n=5+5) _jsonBody-2 3.60 ± 6% 3.64 ± 4% ~ (p=0.690 n=5+5) _jsonBodyValidation-2 4.08 ± 6% 4.28 ± 5% ~ (p=0.310 n=5+5) _outputHeaders-2 1.97 ± 4% 2.01 ± 3% ~ (p=0.246 n=5+5) _requestResponseMapping-2 3.64 ±11% 3.63 ± 3% ~ (p=0.841 n=5+5) _validation-2 3.88 ± 4% 3.88 ± 5% ~ (p=1.000 n=5+5) _noValidation-2 2.85 ± 6% 2.81 ± 6% ~ (p=0.841 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 2.03 ± 4% 1.94 ± 8% ~ (p=0.087 n=5+5) _directGzipHead-2 1.96 ± 6% 2.01 ± 6% ~ (p=0.222 n=5+5) _noDirectGzip-2 8.91 ± 2% 8.45 ± 4% -5.12% (p=0.016 n=5+5) _directGzip_decode-2 25.3 ± 6% 25.3 ±12% ~ (p=0.841 n=5+5) _noDirectGzip_decode-2 8.78 ± 3% 8.56 ± 4% ~ (p=0.222 n=5+5) _htmlResponse-2 3.24 ± 7% 3.23 ± 7% ~ (p=0.690 n=5+5) _jsonBodyManual-2 2.43 ± 9% 2.47 ± 3% ~ (p=0.421 n=5+5) _jsonBody-2 3.33 ± 8% 3.42 ± 1% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 4.17 ± 5% 4.27 ± 5% ~ (p=0.548 n=5+5) _outputHeaders-2 3.07 ± 6% 3.11 ± 6% ~ (p=0.548 n=5+5) _requestResponseMapping-2 3.49 ± 7% 3.51 ± 3% ~ (p=0.548 n=5+5) _validation-2 3.76 ± 2% 3.86 ± 6% ~ (p=0.548 n=5+5) _noValidation-2 2.80 ± 0% 2.91 ± 5% +3.92% (p=0.032 n=4+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 2.12 ± 5% 2.16 ± 6% ~ (p=0.421 n=5+5) _ok-2 2.09 ± 6% 2.11 ± 6% ~ (p=1.000 n=5+5) _invalidBody-2 2.84 ± 5% 2.95 ± 4% ~ (p=0.095 n=5+5) name old 90%:ms new 90%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 5.86 ±84% 4.54 ±80% ~ (p=0.841 n=5+5) _directGzipHead-2 3.30 ± 3% 3.49 ± 6% +5.99% (p=0.048 n=5+5) _noDirectGzip-2 16.6 ± 6% 17.2 ± 5% ~ (p=0.421 n=5+5) _directGzip_decode-2 52.9 ± 9% 53.6 ± 6% ~ (p=0.421 n=5+5) _noDirectGzip_decode-2 16.8 ± 2% 16.6 ± 6% ~ (p=0.841 n=5+5) _jsonBody-2 6.98 ± 8% 7.17 ± 4% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 7.39 ± 5% 7.81 ± 7% ~ (p=0.095 n=5+5) _outputHeaders-2 3.50 ± 2% 3.67 ±10% +4.79% (p=0.024 n=5+5) _requestResponseMapping-2 7.42 ±16% 7.07 ± 3% ~ (p=0.421 n=5+5) _validation-2 7.71 ± 6% 7.44 ± 4% ~ (p=0.095 n=5+5) _noValidation-2 5.78 ± 3% 5.57 ±10% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 3.65 ± 8% 3.41 ±11% ~ (p=0.095 n=5+5) _directGzipHead-2 3.55 ± 6% 3.52 ± 6% ~ (p=0.841 n=5+5) _noDirectGzip-2 17.1 ± 5% 17.4 ± 5% ~ (p=0.341 n=5+5) _directGzip_decode-2 55.3 ± 9% 55.2 ± 5% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 16.8 ± 4% 17.2 ± 4% ~ (p=0.310 n=5+5) _htmlResponse-2 6.14 ±10% 6.07 ± 2% ~ (p=0.548 n=5+5) _jsonBodyManual-2 4.32 ± 6% 4.28 ± 8% ~ (p=0.690 n=5+5) _jsonBody-2 6.54 ± 2% 6.40 ± 4% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 7.74 ± 5% 8.11 ± 3% ~ (p=0.056 n=5+5) _outputHeaders-2 6.40 ± 6% 6.25 ± 4% ~ (p=0.421 n=5+5) _requestResponseMapping-2 7.11 ± 6% 6.99 ± 2% ~ (p=0.690 n=5+5) _validation-2 7.49 ± 7% 7.43 ± 7% ~ (p=0.690 n=5+5) _noValidation-2 5.76 ± 6% 5.50 ± 1% ~ (p=0.095 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 3.68 ± 5% 3.75 ± 9% ~ (p=1.000 n=5+5) _ok-2 3.65 ± 4% 3.89 ±12% ~ (p=0.151 n=5+5) _invalidBody-2 5.79 ± 3% 5.88 ± 4% ~ (p=0.548 n=5+5) name old 99%:ms new 99%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 11.8 ±89% 10.6 ±65% ~ (p=1.000 n=5+5) _directGzipHead-2 5.76 ±12% 5.84 ±13% ~ (p=0.690 n=5+5) _noDirectGzip-2 23.2 ± 7% 24.0 ± 4% ~ (p=0.151 n=5+5) _directGzip_decode-2 86.3 ±10% 92.7 ± 9% ~ (p=0.151 n=5+5) _noDirectGzip_decode-2 22.9 ± 5% 22.6 ± 4% ~ (p=0.690 n=5+5) _jsonBody-2 11.0 ±14% 10.3 ± 9% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 11.2 ±14% 11.4 ±10% ~ (p=0.841 n=5+5) _outputHeaders-2 6.29 ±13% 6.37 ± 9% ~ (p=0.690 n=5+5) _requestResponseMapping-2 12.5 ±47% 11.7 ±19% ~ (p=0.841 n=5+5) _validation-2 12.2 ±20% 11.9 ±11% ~ (p=0.841 n=5+5) _noValidation-2 9.68 ±12% 9.47 ±10% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 7.51 ±48% 5.58 ± 7% ~ (p=0.111 n=5+4) _directGzipHead-2 6.20 ±11% 5.84 ± 7% ~ (p=0.690 n=5+5) _noDirectGzip-2 23.5 ± 3% 23.1 ± 6% ~ (p=0.690 n=5+5) _directGzip_decode-2 91.3 ±13% 88.7 ± 8% ~ (p=0.841 n=5+5) _noDirectGzip_decode-2 23.6 ± 6% 22.8 ± 9% ~ (p=0.151 n=5+5) _htmlResponse-2 9.95 ±10% 9.64 ± 6% ~ (p=0.889 n=5+5) _jsonBodyManual-2 7.69 ±11% 7.18 ± 9% ~ (p=0.222 n=5+5) _jsonBody-2 10.3 ± 3% 10.2 ± 7% ~ (p=0.587 n=4+5) _jsonBodyValidation-2 11.5 ± 5% 12.0 ±12% ~ (p=0.421 n=5+5) _outputHeaders-2 10.0 ±10% 10.4 ± 6% ~ (p=0.889 n=5+5) _requestResponseMapping-2 10.3 ± 5% 11.2 ±11% ~ (p=0.151 n=5+5) _validation-2 11.8 ±21% 11.7 ±13% ~ (p=1.000 n=5+5) _noValidation-2 9.45 ± 3% 9.47 ±15% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 5.84 ± 4% 5.96 ± 6% ~ (p=0.905 n=4+5) _ok-2 5.69 ± 3% 7.56 ±80% ~ (p=0.310 n=5+5) _invalidBody-2 9.49 ±11% 10.22 ±15% ~ (p=0.222 n=5+5) name old 99.9%:ms new 99.9%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 19.0 ±93% 20.1 ±50% ~ (p=1.000 n=5+5) _directGzipHead-2 8.89 ±39% 8.52 ±15% ~ (p=0.841 n=5+5) _noDirectGzip-2 28.5 ±14% 29.5 ± 6% ~ (p=0.841 n=5+5) _directGzip_decode-2 125 ±12% 124 ±14% ~ (p=0.841 n=5+5) _noDirectGzip_decode-2 27.5 ±10% 27.9 ± 9% ~ (p=0.548 n=5+5) _jsonBody-2 17.1 ±22% 14.4 ±12% ~ (p=0.095 n=5+5) _jsonBodyValidation-2 15.9 ±15% 17.1 ±22% ~ (p=0.548 n=5+5) _outputHeaders-2 9.60 ±22% 9.60 ±16% ~ (p=1.000 n=5+5) _requestResponseMapping-2 20.0 ±47% 19.5 ±59% ~ (p=1.000 n=5+5) _validation-2 18.0 ±28% 19.4 ±23% ~ (p=0.548 n=5+5) _noValidation-2 16.1 ±17% 13.1 ± 8% -18.92% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 12.1 ±66% 11.7 ±99% ~ (p=1.000 n=5+5) _directGzipHead-2 10.8 ±21% 9.0 ±21% ~ (p=0.063 n=5+5) _noDirectGzip-2 28.9 ±15% 28.7 ±18% ~ (p=0.897 n=5+5) _directGzip_decode-2 111 ±10% 111 ± 3% ~ (p=0.873 n=5+4) _noDirectGzip_decode-2 26.7 ± 7% 27.5 ±18% ~ (p=0.841 n=5+5) _htmlResponse-2 17.3 ±29% 13.9 ±17% ~ (p=0.095 n=5+5) _jsonBodyManual-2 15.5 ±37% 10.8 ±18% ~ (p=0.056 n=5+5) _jsonBody-2 14.8 ±20% 14.3 ±11% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 16.5 ±12% 17.7 ±35% ~ (p=1.000 n=5+5) _outputHeaders-2 15.6 ±22% 17.2 ±12% ~ (p=0.341 n=5+5) _requestResponseMapping-2 16.0 ±38% 16.0 ±24% ~ (p=0.841 n=5+5) _validation-2 15.5 ±16% 17.7 ±28% ~ (p=0.421 n=5+5) _noValidation-2 13.0 ± 3% 13.6 ±28% ~ (p=0.841 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 10.8 ±49% 8.7 ±16% ~ (p=0.151 n=5+5) _ok-2 9.78 ±68% 14.06 ±81% ~ (p=0.151 n=5+5) _invalidBody-2 14.4 ±53% 14.6 ±39% ~ (p=0.690 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 630 ± 0% 630 ± 0% ~ (all equal) _directGzipHead-2 174 ± 0% 174 ± 0% ~ (all equal) _noDirectGzip-2 1.03k ± 0% 1.03k ± 0% ~ (all equal) _directGzip_decode-2 630 ± 0% 630 ± 0% ~ (all equal) _noDirectGzip_decode-2 1.03k ± 0% 1.03k ± 0% ~ (all equal) _jsonBody-2 199 ± 0% 199 ± 0% ~ (all equal) _jsonBodyValidation-2 185 ± 0% 185 ± 0% ~ (all equal) _outputHeaders-2 146 ± 0% 146 ± 0% ~ (all equal) _requestResponseMapping-2 94.0 ± 0% 94.0 ± 0% ~ (all equal) _validation-2 168 ± 0% 168 ± 0% ~ (all equal) _noValidation-2 168 ± 0% 168 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 638 ± 0% 638 ± 0% ~ (all equal) _directGzipHead-2 182 ± 0% 182 ± 0% ~ (all equal) _noDirectGzip-2 1.04k ± 0% 1.04k ± 0% ~ (all equal) _directGzip_decode-2 638 ± 0% 638 ± 0% ~ (all equal) _noDirectGzip_decode-2 1.04k ± 0% 1.04k ± 0% ~ (all equal) _htmlResponse-2 355 ± 0% 355 ± 0% ~ (all equal) _jsonBodyManual-2 207 ± 0% 207 ± 0% ~ (all equal) _jsonBody-2 207 ± 0% 207 ± 0% ~ (all equal) _jsonBodyValidation-2 193 ± 0% 193 ± 0% ~ (all equal) _outputHeaders-2 214 ± 0% 214 ± 0% ~ (all equal) _requestResponseMapping-2 108 ± 0% 108 ± 0% ~ (all equal) _validation-2 176 ± 0% 176 ± 0% ~ (all equal) _noValidation-2 176 ± 0% 176 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 322 ± 0% 322 ± 0% ~ (all equal) _ok-2 344 ± 0% 344 ± 0% ~ (all equal) _invalidBody-2 420 ± 0% 420 ± 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) _requestResponseMapping-2 169 ± 0% 169 ± 0% ~ (all equal) _validation-2 170 ± 0% 170 ± 0% ~ (all equal) _noValidation-2 173 ± 0% 173 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 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) _htmlResponse-2 108 ± 0% 108 ± 0% ~ (all equal) _jsonBodyManual-2 195 ± 0% 195 ± 0% ~ (all equal) _jsonBody-2 188 ± 0% 188 ± 0% ~ (all equal) _jsonBodyValidation-2 192 ± 0% 192 ± 0% ~ (all equal) _outputHeaders-2 88.0 ± 0% 88.0 ± 0% ~ (all equal) _requestResponseMapping-2 169 ± 0% 169 ± 0% ~ (all equal) _validation-2 170 ± 0% 170 ± 0% ~ (all equal) _noValidation-2 173 ± 0% 173 ± 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 20.0k ±42% 21.2k ±36% ~ (p=0.841 n=5+5) _directGzipHead-2 25.4k ± 5% 25.3k ± 5% ~ (p=0.841 n=5+5) _noDirectGzip-2 5.55k ± 3% 5.43k ± 2% ~ (p=0.095 n=5+5) _directGzip_decode-2 1.61k ± 2% 1.54k ± 2% -4.69% (p=0.008 n=5+5) _noDirectGzip_decode-2 5.51k ± 1% 5.47k ± 3% ~ (p=0.841 n=5+5) _jsonBody-2 12.7k ± 4% 12.5k ± 3% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 11.5k ± 5% 11.0k ± 5% ~ (p=0.095 n=5+5) _outputHeaders-2 24.2k ± 2% 23.4k ± 3% -3.38% (p=0.032 n=5+5) _requestResponseMapping-2 12.3k ± 9% 12.5k ± 4% ~ (p=0.889 n=5+5) _validation-2 11.5k ± 4% 11.6k ± 3% ~ (p=0.690 n=5+5) _noValidation-2 15.8k ± 3% 16.2k ± 3% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 23.3k ± 8% 24.9k ± 0% ~ (p=0.190 n=5+4) _directGzipHead-2 24.0k ± 2% 24.1k ± 1% ~ (p=0.690 n=5+5) _noDirectGzip-2 5.40k ± 3% 5.46k ± 2% ~ (p=0.548 n=5+5) _directGzip_decode-2 1.52k ± 8% 1.55k ± 4% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 5.39k ± 2% 5.41k ± 2% ~ (p=0.841 n=5+5) _htmlResponse-2 14.3k ± 4% 14.8k ± 4% ~ (p=0.056 n=5+5) _jsonBodyManual-2 19.6k ± 2% 19.6k ± 3% ~ (p=1.000 n=5+5) _jsonBody-2 13.7k ± 2% 13.8k ± 3% ~ (p=0.841 n=5+5) _jsonBodyValidation-2 11.1k ± 3% 11.0k ± 6% ~ (p=0.310 n=5+5) _outputHeaders-2 14.6k ± 3% 14.5k ± 4% ~ (p=0.690 n=5+5) _requestResponseMapping-2 12.9k ± 2% 12.6k ± 3% ~ (p=0.095 n=5+5) _validation-2 11.9k ± 3% 11.9k ± 3% ~ (p=0.841 n=5+5) _noValidation-2 15.7k ± 2% 15.9k ± 1% ~ (p=0.421 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 22.4k ± 8% 22.8k ± 4% ~ (p=0.421 n=5+5) _ok-2 22.9k ± 1% 21.8k ±16% ~ (p=0.690 n=5+5) _invalidBody-2 15.6k ± 1% 15.3k ± 4% ~ (p=0.056 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 ± 1% 3.87kB ± 1% ~ (p=0.548 n=5+5) _directGzipHead-2 3.86kB ± 0% 3.86kB ± 0% ~ (p=0.643 n=5+5) _noDirectGzip-2 7.47kB ±13% 7.77kB ±21% ~ (p=0.690 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 6.02kB ± 9% 6.17kB ±12% ~ (p=0.841 n=5+5) _jsonBody-2 13.1kB ± 0% 13.1kB ± 0% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 18.9kB ± 0% 18.9kB ± 0% ~ (p=0.548 n=5+5) _outputHeaders-2 3.58kB ± 0% 3.58kB ± 0% ~ (p=0.921 n=5+5) _requestResponseMapping-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.897 n=5+5) _validation-2 16.5kB ± 0% 16.5kB ± 0% ~ (p=0.198 n=5+5) _noValidation-2 7.77kB ± 0% 7.77kB ± 0% ~ (p=0.524 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 3.90kB ± 0% 3.89kB ± 0% ~ (p=0.183 n=5+5) _directGzipHead-2 3.89kB ± 0% 3.89kB ± 0% ~ (p=0.968 n=5+5) _noDirectGzip-2 7.42kB ±26% 7.09kB ±17% ~ (p=0.151 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.730 n=4+5) _noDirectGzip_decode-2 6.45kB ± 5% 6.06kB ±13% ~ (p=0.222 n=5+5) _htmlResponse-2 8.08kB ± 0% 8.08kB ± 0% ~ (p=0.222 n=5+4) _jsonBodyManual-2 4.50kB ± 0% 4.50kB ± 0% ~ (p=0.175 n=5+4) _jsonBody-2 10.2kB ± 0% 10.2kB ± 0% +0.04% (p=0.024 n=5+5) _jsonBodyValidation-2 19.0kB ± 0% 19.0kB ± 0% ~ (p=0.889 n=5+5) _outputHeaders-2 10.4kB ± 0% 10.4kB ± 0% ~ (p=0.500 n=5+5) _requestResponseMapping-2 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.881 n=5+5) _validation-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.262 n=5+5) _noValidation-2 7.83kB ± 0% 7.84kB ± 0% ~ (p=0.643 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 4.64kB ± 0% 4.64kB ± 0% ~ (p=0.294 n=5+5) _ok-2 4.55kB ± 0% 4.55kB ± 0% ~ (p=0.457 n=4+4) _invalidBody-2 8.37kB ± 4% 8.37kB ± 4% ~ (p=0.857 n=5+5) name old allocs/op new allocs/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 42.0 ± 0% 42.0 ± 0% ~ (all equal) _directGzipHead-2 42.0 ± 0% 42.0 ± 0% ~ (all equal) _noDirectGzip-2 50.2 ± 4% 51.0 ± 0% ~ (p=0.556 n=5+4) _directGzip_decode-2 504 ± 0% 505 ± 0% ~ (p=0.571 n=5+5) _noDirectGzip_decode-2 50.0 ± 0% 50.0 ± 0% ~ (all equal) _jsonBody-2 128 ± 0% 128 ± 0% ~ (all equal) _jsonBodyValidation-2 185 ± 0% 185 ± 0% ~ (all equal) _outputHeaders-2 36.0 ± 0% 36.0 ± 0% ~ (all equal) _requestResponseMapping-2 124 ± 0% 124 ± 0% ~ (all equal) _validation-2 154 ± 0% 154 ± 0% ~ (all equal) _noValidation-2 91.0 ± 0% 91.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 44.0 ± 0% 44.0 ± 0% ~ (all equal) _directGzipHead-2 44.0 ± 0% 44.0 ± 0% ~ (all equal) _noDirectGzip-2 53.0 ± 0% 53.0 ± 0% ~ (all equal) _directGzip_decode-2 506 ± 0% 506 ± 0% ~ (p=0.881 n=5+5) _noDirectGzip_decode-2 52.0 ± 0% 52.0 ± 0% ~ (all equal) _htmlResponse-2 145 ± 0% 145 ± 0% ~ (all equal) _jsonBodyManual-2 49.0 ± 0% 49.0 ± 0% ~ (all equal) _jsonBody-2 100 ± 0% 100 ± 0% ~ (all equal) _jsonBodyValidation-2 187 ± 0% 187 ± 0% ~ (all equal) _outputHeaders-2 113 ± 0% 113 ± 0% ~ (all equal) _requestResponseMapping-2 126 ± 0% 126 ± 0% ~ (all equal) _validation-2 156 ± 0% 156 ± 0% ~ (all equal) _noValidation-2 93.0 ± 0% 93.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 53.0 ± 0% 53.0 ± 0% ~ (all equal) _ok-2 49.0 ± 0% 49.0 ± 0% ~ (all equal) _invalidBody-2 97.8 ± 2% 97.8 ± 2% ~ (p=1.000 n=5+5) ```