swaggest / rest

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

Remove body from schema of 1xx, 204, 304 responses #148

Closed vearutop closed 1 year ago

github-actions[bot] commented 1 year ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 106 7667 (+11) 5577 (+8) 503 1587 (+3) 943 (+7) 185.8K (+334B)
JSON 3 1567 (-3) 1567 (-3) 0 0 0 64.9K (-129B)
github-actions[bot] commented 1 year ago

Go API Changes

# summary
Inferred base version: v0.2.43
Suggested version: v0.2.44
github-actions[bot] commented 1 year ago

Unit Test Coverage

total: (statements) 83.4% changed lines: (statements) 90.0%

Coverage of changed lines | File | Function | Coverage | |--------------------------|-----------------------|----------| | Total | | 90.0% | | openapi/collector.go | | 90.0% | | openapi/collector.go:265 | setJSONResponse | 100.0% | | openapi/collector.go:319 | combineErrors | 100.0% | | openapi/collector.go:278 | processExpectedErrors | 60.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |-----------------------------------------------|-----------------------|---------------|------------------| | Total | | 83.4% | 83.4% (0.0%) | | github.com/swaggest/rest/openapi/collector.go | combineErrors | no function | 72.7% | | github.com/swaggest/rest/openapi/collector.go | processExpectedErrors | 83.3% | 87.5% (+4.2%) |
codecov[bot] commented 1 year ago

Codecov Report

Merging #148 (033a317) into master (05afe69) will decrease coverage by 0.07%. The diff coverage is 60.00%.

@@            Coverage Diff             @@
##           master     #148      +/-   ##
==========================================
- Coverage   77.75%   77.68%   -0.07%     
==========================================
  Files          28       28              
  Lines        1596     1600       +4     
==========================================
+ Hits         1241     1243       +2     
- Misses        234      235       +1     
- Partials      121      122       +1     
Flag Coverage Δ
unittests 77.68% <60.00%> (-0.07%) :arrow_down:

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

Impacted Files Coverage Δ
openapi/collector.go 64.21% <60.00%> (-0.21%) :arrow_down:

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

github-actions[bot] commented 1 year 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.82µs ± 9% 1.84µs ± 8% ~ (p=0.329 n=6+5) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 902ns ± 1% 928ns ± 5% +2.83% (p=0.030 n=5+6) DecoderFunc_Decode-2 2.58µs ± 2% 2.53µs ± 1% -1.98% (p=0.017 n=6+5) Decoder_Decode_json-2 30.2µs ± 5% 29.8µs ± 3% ~ (p=0.699 n=6+6) Decoder_Decode_queryObject-2 6.17µs ± 1% 6.07µs ± 1% -1.56% (p=0.022 n=6+6) Decoder_Decode_jsonParam-2 2.41µs ± 3% 2.42µs ± 2% ~ (p=0.699 n=6+6) DecoderFactory_SetDecoderFunc-2 2.21µs ± 2% 2.22µs ± 1% ~ (p=0.699 n=6+6) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 14.4µs ± 3% 14.4µs ± 2% ~ (p=0.667 n=6+6) Middleware_control-2 4.87µs ± 1% 4.95µs ± 8% ~ (p=1.000 n=5+6) 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.15kB ± 1% 1.16kB ± 4% ~ (p=0.372 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.84µs ± 8% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 928ns ± 5% DecoderFunc_Decode-2 2.53µs ± 1% Decoder_Decode_json-2 29.8µs ± 3% Decoder_Decode_queryObject-2 6.07µs ± 1% Decoder_Decode_jsonParam-2 2.42µs ± 2% DecoderFactory_SetDecoderFunc-2 2.22µs ± 1% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 14.4µs ± 2% Middleware_control-2 4.95µs ± 8% 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.16kB ± 4% 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 1 year 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 24.9µs ± 2% 25.5µs ±14% ~ (p=0.841 n=5+5) _directGzipHead-2 25.4µs ± 1% 24.5µs ± 3% -3.46% (p=0.016 n=4+5) _noDirectGzip-2 136µs ± 0% 134µs ± 1% -0.92% (p=0.032 n=4+5) _directGzip_decode-2 501µs ± 4% 492µs ± 2% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 139µs ± 2% 137µs ± 2% ~ (p=0.151 n=5+5) _jsonBody-2 50.7µs ± 2% 49.6µs ± 1% -2.31% (p=0.032 n=5+5) _jsonBodyValidation-2 59.6µs ± 2% 60.2µs ± 3% ~ (p=0.548 n=5+5) _outputHeaders-2 26.0µs ± 2% 26.3µs ± 2% ~ (p=0.056 n=5+5) _requestResponseMapping-2 50.4µs ± 3% 49.9µs ± 2% ~ (p=0.548 n=5+5) _validation-2 53.2µs ± 2% 52.6µs ± 1% ~ (p=0.056 n=5+5) _noValidation-2 38.0µs ± 2% 38.1µs ± 4% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 25.3µs ± 5% 25.4µs ± 3% ~ (p=0.841 n=5+5) _directGzipHead-2 25.6µs ± 1% 25.8µs ± 1% ~ (p=0.286 n=5+4) _noDirectGzip-2 129µs ± 1% 129µs ± 2% ~ (p=0.841 n=5+5) _directGzip_decode-2 503µs ± 2% 498µs ± 2% ~ (p=0.310 n=5+5) _noDirectGzip_decode-2 130µs ± 3% 129µs ± 1% ~ (p=0.222 n=5+5) _htmlResponse-2 42.7µs ± 2% 42.6µs ± 2% ~ (p=0.841 n=5+5) _jsonBodyManual-2 30.5µs ± 4% 30.1µs ± 1% ~ (p=0.841 n=5+5) _jsonBody-2 45.4µs ± 1% 45.4µs ± 3% ~ (p=0.548 n=5+5) _jsonBodyValidation-2 61.4µs ± 4% 61.5µs ± 1% ~ (p=0.548 n=5+5) _outputHeaders-2 44.3µs ± 2% 44.0µs ± 2% ~ (p=0.421 n=5+5) _requestResponseMapping-2 52.9µs ± 3% 53.2µs ± 2% ~ (p=0.548 n=5+5) _validation-2 56.1µs ± 4% 56.0µs ± 3% ~ (p=1.000 n=5+5) _noValidation-2 39.2µs ± 7% 38.7µs ± 4% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 28.1µs ± 6% 26.8µs ± 1% -4.70% (p=0.016 n=5+4) _ok-2 29.0µs ±13% 27.5µs ± 2% -5.14% (p=0.032 n=5+5) _invalidBody-2 42.2µs ± 2% 41.9µs ± 3% ~ (p=0.841 n=5+5) name old 50%:ms new 50%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 1.16 ± 5% 1.16 ± 5% ~ (p=0.714 n=5+5) _directGzipHead-2 1.19 ± 5% 1.15 ± 6% ~ (p=0.421 n=5+5) _noDirectGzip-2 6.44 ± 1% 6.50 ± 3% ~ (p=0.730 n=4+5) _directGzip_decode-2 19.2 ± 5% 18.5 ± 4% ~ (p=0.222 n=5+5) _noDirectGzip_decode-2 6.76 ± 8% 6.63 ± 7% ~ (p=0.421 n=5+5) _jsonBody-2 2.23 ± 3% 2.22 ± 5% ~ (p=0.595 n=5+5) _jsonBodyValidation-2 2.79 ± 3% 2.81 ± 3% ~ (p=1.000 n=5+5) _outputHeaders-2 1.18 ± 6% 1.22 ± 6% ~ (p=0.341 n=5+5) _requestResponseMapping-2 2.28 ±10% 2.25 ± 3% ~ (p=1.000 n=5+5) _validation-2 2.43 ± 5% 2.37 ± 4% ~ (p=0.421 n=5+5) _noValidation-2 1.71 ± 5% 1.64 ± 8% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 1.19 ± 6% 1.18 ± 5% ~ (p=0.952 n=5+5) _directGzipHead-2 1.17 ± 4% 1.19 ± 7% ~ (p=0.524 n=5+5) _noDirectGzip-2 6.28 ± 4% 6.21 ± 6% ~ (p=0.421 n=5+5) _directGzip_decode-2 19.2 ± 6% 19.3 ± 6% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 6.34 ± 7% 6.24 ± 3% ~ (p=0.841 n=5+5) _htmlResponse-2 1.93 ± 6% 1.94 ± 6% ~ (p=0.421 n=5+5) _jsonBodyManual-2 1.40 ± 2% 1.40 ± 5% ~ (p=0.690 n=5+5) _jsonBody-2 1.94 ± 6% 2.04 ± 4% ~ (p=0.056 n=5+5) _jsonBodyValidation-2 2.70 ± 9% 2.81 ± 5% ~ (p=0.548 n=5+5) _outputHeaders-2 1.83 ± 3% 1.86 ± 5% ~ (p=0.421 n=5+5) _requestResponseMapping-2 2.37 ± 7% 2.32 ± 9% ~ (p=0.548 n=5+5) _validation-2 2.38 ± 4% 2.46 ± 4% ~ (p=0.222 n=5+5) _noValidation-2 1.67 ± 6% 1.71 ± 5% ~ (p=0.421 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 1.31 ± 5% 1.32 ± 5% ~ (p=0.841 n=5+5) _ok-2 1.33 ± 4% 1.33 ± 4% ~ (p=1.000 n=5+5) _invalidBody-2 1.75 ± 5% 1.72 ± 3% ~ (p=0.333 n=5+5) name old 90%:ms new 90%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 2.09 ± 4% 2.17 ± 6% ~ (p=0.167 n=5+5) _directGzipHead-2 2.21 ± 3% 2.13 ± 2% -3.70% (p=0.032 n=5+5) _noDirectGzip-2 11.7 ± 3% 11.6 ± 4% ~ (p=0.278 n=5+5) _directGzip_decode-2 42.0 ± 2% 40.7 ± 4% ~ (p=0.095 n=5+5) _noDirectGzip_decode-2 11.9 ± 3% 12.0 ± 4% ~ (p=0.690 n=5+5) _jsonBody-2 4.65 ± 7% 4.55 ± 4% ~ (p=0.421 n=5+5) _jsonBodyValidation-2 5.28 ± 6% 5.23 ± 4% ~ (p=0.421 n=5+5) _outputHeaders-2 2.15 ± 2% 2.24 ± 8% +4.17% (p=0.024 n=5+5) _requestResponseMapping-2 4.51 ± 5% 4.38 ± 5% ~ (p=0.310 n=5+5) _validation-2 4.67 ± 3% 4.70 ± 3% ~ (p=1.000 n=5+5) _noValidation-2 3.65 ± 4% 3.65 ± 7% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 2.19 ± 6% 2.15 ± 6% ~ (p=0.690 n=5+5) _directGzipHead-2 2.20 ± 6% 2.18 ± 4% ~ (p=0.841 n=5+5) _noDirectGzip-2 11.2 ± 3% 11.3 ± 3% ~ (p=0.690 n=5+5) _directGzip_decode-2 40.5 ± 3% 41.7 ± 7% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 11.0 ± 8% 11.2 ± 3% ~ (p=0.222 n=5+5) _htmlResponse-2 3.93 ± 3% 3.98 ± 7% ~ (p=1.000 n=5+5) _jsonBodyManual-2 2.61 ± 9% 2.52 ± 2% ~ (p=0.841 n=5+5) _jsonBody-2 4.37 ± 4% 4.34 ± 9% ~ (p=0.548 n=5+5) _jsonBodyValidation-2 5.55 ±10% 5.56 ± 4% ~ (p=0.841 n=5+5) _outputHeaders-2 4.41 ± 5% 4.29 ± 5% ~ (p=0.310 n=5+5) _requestResponseMapping-2 4.80 ± 3% 4.82 ± 3% ~ (p=0.841 n=5+5) _validation-2 5.31 ± 4% 5.18 ± 5% ~ (p=0.421 n=5+5) _noValidation-2 3.85 ± 5% 3.84 ± 6% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 2.44 ± 8% 2.35 ± 6% ~ (p=0.310 n=5+5) _ok-2 2.49 ± 8% 2.37 ± 6% ~ (p=0.151 n=5+5) _invalidBody-2 4.15 ± 5% 4.12 ± 7% ~ (p=1.000 n=5+5) name old 99%:ms new 99%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 3.66 ± 8% 3.66 ± 8% ~ (p=0.730 n=5+4) _directGzipHead-2 4.20 ± 3% 3.74 ± 8% -10.90% (p=0.016 n=4+5) _noDirectGzip-2 17.3 ±26% 16.0 ± 5% ~ (p=0.222 n=5+5) _directGzip_decode-2 74.1 ±11% 71.4 ± 6% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 16.4 ± 4% 16.5 ± 7% ~ (p=1.000 n=5+5) _jsonBody-2 6.64 ± 5% 6.90 ± 7% ~ (p=0.690 n=5+5) _jsonBodyValidation-2 7.74 ±13% 8.31 ±29% ~ (p=0.690 n=5+5) _outputHeaders-2 4.51 ±26% 4.81 ±15% ~ (p=0.310 n=5+5) _requestResponseMapping-2 7.64 ±15% 7.16 ±24% ~ (p=0.421 n=5+5) _validation-2 7.07 ±16% 6.81 ± 7% ~ (p=0.730 n=5+5) _noValidation-2 5.92 ± 5% 6.22 ±10% ~ (p=0.421 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 4.31 ±43% 4.13 ±12% ~ (p=0.841 n=5+5) _directGzipHead-2 4.32 ± 8% 5.39 ±84% ~ (p=1.000 n=5+5) _noDirectGzip-2 15.4 ± 4% 15.6 ± 7% ~ (p=0.841 n=5+5) _directGzip_decode-2 65.5 ± 6% 67.6 ± 9% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 15.0 ± 7% 14.7 ± 3% ~ (p=0.595 n=5+5) _htmlResponse-2 6.24 ± 7% 6.40 ±12% ~ (p=0.548 n=5+5) _jsonBodyManual-2 4.89 ±23% 4.90 ± 5% ~ (p=0.341 n=5+5) _jsonBody-2 6.94 ±12% 6.93 ±17% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 8.55 ±14% 8.17 ±13% ~ (p=0.421 n=5+5) _outputHeaders-2 7.04 ± 8% 6.74 ± 6% ~ (p=0.421 n=5+5) _requestResponseMapping-2 7.92 ±21% 7.89 ± 4% ~ (p=0.548 n=5+5) _validation-2 9.30 ±40% 8.28 ±15% ~ (p=1.000 n=5+5) _noValidation-2 6.89 ±40% 6.40 ±17% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 3.81 ± 6% 3.61 ± 6% ~ (p=0.343 n=4+4) _ok-2 4.22 ± 4% 3.82 ± 8% -9.39% (p=0.032 n=4+5) _invalidBody-2 7.72 ±21% 7.26 ±18% ~ (p=0.421 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 7.16 ±37% 9.19 ±70% ~ (p=0.548 n=5+5) _directGzipHead-2 9.68 ±63% 9.65 ±16% ~ (p=0.310 n=5+5) _noDirectGzip-2 20.8 ±20% 21.2 ±29% ~ (p=0.841 n=5+5) _directGzip_decode-2 101 ±21% 89 ± 6% ~ (p=0.421 n=5+5) _noDirectGzip_decode-2 19.9 ± 6% 22.7 ±35% ~ (p=0.151 n=5+5) _jsonBody-2 11.8 ±21% 11.5 ±30% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 12.4 ±18% 14.5 ±42% ~ (p=0.548 n=5+5) _outputHeaders-2 12.5 ±17% 11.6 ±53% ~ (p=0.421 n=5+5) _requestResponseMapping-2 14.9 ±24% 12.9 ±15% ~ (p=0.095 n=5+5) _validation-2 12.6 ±26% 11.7 ±26% ~ (p=0.841 n=5+5) _noValidation-2 10.0 ±32% 12.3 ±31% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 8.69 ±48% 9.40 ±31% ~ (p=0.690 n=5+5) _directGzipHead-2 9.21 ±23% 10.92 ±34% ~ (p=1.000 n=5+5) _noDirectGzip-2 22.1 ±50% 19.6 ± 6% ~ (p=1.000 n=5+5) _directGzip_decode-2 86.3 ±10% 97.0 ±30% ~ (p=0.222 n=5+5) _noDirectGzip_decode-2 18.8 ±10% 17.4 ± 7% ~ (p=0.095 n=5+5) _htmlResponse-2 9.29 ±16% 10.12 ±25% ~ (p=0.421 n=5+5) _jsonBodyManual-2 10.5 ±33% 10.9 ±32% ~ (p=0.730 n=5+5) _jsonBody-2 12.7 ±32% 12.2 ±23% ~ (p=0.841 n=5+5) _jsonBodyValidation-2 15.6 ±10% 13.8 ± 9% -11.53% (p=0.032 n=5+5) _outputHeaders-2 13.6 ±59% 12.7 ±24% ~ (p=0.841 n=5+5) _requestResponseMapping-2 13.8 ±18% 13.2 ±24% ~ (p=0.421 n=5+5) _validation-2 15.9 ±36% 13.5 ±17% ~ (p=0.310 n=5+5) _noValidation-2 13.1 ±67% 11.3 ±25% ~ (p=0.841 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 8.48 ±40% 8.60 ±61% ~ (p=0.841 n=5+5) _ok-2 13.0 ±38% 6.6 ±54% -48.84% (p=0.032 n=5+5) _invalidBody-2 14.6 ±34% 14.0 ±16% ~ (p=0.548 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 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 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 40.1k ± 2% 39.3k ±13% ~ (p=0.841 n=5+5) _directGzipHead-2 39.4k ± 1% 40.8k ± 3% +3.61% (p=0.016 n=4+5) _noDirectGzip-2 7.38k ± 0% 7.44k ± 1% +0.92% (p=0.032 n=4+5) _directGzip_decode-2 2.00k ± 4% 2.03k ± 2% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 7.21k ± 2% 7.31k ± 2% ~ (p=0.151 n=5+5) _jsonBody-2 19.7k ± 2% 20.2k ± 1% +2.34% (p=0.032 n=5+5) _jsonBodyValidation-2 16.8k ± 2% 16.6k ± 3% ~ (p=0.548 n=5+5) _outputHeaders-2 38.5k ± 2% 38.0k ± 2% ~ (p=0.056 n=5+5) _requestResponseMapping-2 19.8k ± 3% 20.0k ± 2% ~ (p=0.548 n=5+5) _validation-2 18.8k ± 2% 19.0k ± 1% ~ (p=0.056 n=5+5) _noValidation-2 26.3k ± 2% 26.3k ± 4% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 39.5k ± 5% 39.3k ± 3% ~ (p=0.841 n=5+5) _directGzipHead-2 39.0k ± 1% 38.7k ± 1% ~ (p=0.286 n=5+4) _noDirectGzip-2 7.73k ± 1% 7.73k ± 2% ~ (p=0.841 n=5+5) _directGzip_decode-2 1.99k ± 2% 2.01k ± 2% ~ (p=0.310 n=5+5) _noDirectGzip_decode-2 7.67k ± 2% 7.76k ± 1% ~ (p=0.222 n=5+5) _htmlResponse-2 23.4k ± 2% 23.5k ± 2% ~ (p=0.841 n=5+5) _jsonBodyManual-2 32.9k ± 4% 33.2k ± 1% ~ (p=0.841 n=5+5) _jsonBody-2 22.0k ± 1% 22.0k ± 3% ~ (p=0.690 n=5+5) _jsonBodyValidation-2 16.3k ± 4% 16.2k ± 1% ~ (p=0.421 n=5+5) _outputHeaders-2 22.6k ± 2% 22.7k ± 2% ~ (p=0.421 n=5+5) _requestResponseMapping-2 18.9k ± 3% 18.8k ± 2% ~ (p=0.548 n=5+5) _validation-2 17.8k ± 4% 17.9k ± 3% ~ (p=1.000 n=5+5) _noValidation-2 25.6k ± 7% 25.9k ± 4% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 35.6k ± 6% 37.4k ± 1% +4.84% (p=0.016 n=5+4) _ok-2 34.6k ±12% 36.4k ± 2% +5.00% (p=0.032 n=5+5) _invalidBody-2 23.7k ± 2% 23.8k ± 3% ~ (p=0.841 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.86kB ± 0% 3.86kB ± 0% ~ (p=0.079 n=4+5) _directGzipHead-2 3.86kB ± 0% 3.86kB ± 0% ~ (p=0.286 n=5+5) _noDirectGzip-2 6.50kB ±21% 6.77kB ±16% ~ (p=0.548 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 5.59kB ±12% 5.83kB ±13% ~ (p=0.548 n=5+5) _jsonBody-2 13.1kB ± 0% 13.1kB ± 0% ~ (p=0.794 n=5+5) _jsonBodyValidation-2 18.9kB ± 0% 18.9kB ± 0% ~ (p=0.286 n=5+5) _outputHeaders-2 3.58kB ± 0% 3.58kB ± 0% ~ (p=0.587 n=5+5) _requestResponseMapping-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.690 n=5+5) _validation-2 16.5kB ± 0% 16.5kB ± 0% ~ (p=0.397 n=5+5) _noValidation-2 7.77kB ± 0% 7.77kB ± 0% ~ (p=0.889 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 3.89kB ± 0% 3.90kB ± 0% ~ (p=0.444 n=5+5) _directGzipHead-2 3.89kB ± 0% 3.90kB ± 0% ~ (p=0.246 n=5+5) _noDirectGzip-2 6.90kB ±15% 6.93kB ±18% ~ (p=1.000 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 6.16kB ± 5% 5.85kB ± 9% ~ (p=0.222 n=5+5) _htmlResponse-2 8.04kB ± 0% 8.04kB ± 0% ~ (p=1.000 n=5+5) _jsonBodyManual-2 4.50kB ± 0% 4.50kB ± 0% ~ (p=0.317 n=5+5) _jsonBody-2 10.2kB ± 0% 10.2kB ± 0% ~ (p=0.198 n=5+5) _jsonBodyValidation-2 19.0kB ± 0% 19.0kB ± 0% ~ (p=0.246 n=5+5) _outputHeaders-2 10.4kB ± 0% 10.4kB ± 0% ~ (p=0.730 n=5+5) _requestResponseMapping-2 16.6kB ± 0% 16.7kB ± 0% ~ (p=0.381 n=5+5) _validation-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.968 n=5+5) _noValidation-2 7.83kB ± 0% 7.83kB ± 0% ~ (p=0.722 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.659 n=5+5) _ok-2 4.55kB ± 0% 4.55kB ± 0% ~ (p=0.114 n=4+4) _invalidBody-2 8.26kB ± 0% 8.27kB ± 0% ~ (p=0.971 n=4+4) 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 49.8 ± 4% 49.6 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 504 ± 0% 504 ± 0% ~ (p=0.746 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 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 51.6 ± 3% 51.8 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 506 ± 0% 505 ± 0% ~ (p=0.397 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.0 ± 0% 97.0 ± 0% ~ (all equal) ```