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

Add multi API example #192

Closed vearutop closed 4 months ago

vearutop commented 4 months ago

Hopefully related to #190.

github-actions[bot] commented 4 months ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 113 (+1) 8709 (+118) 6277 (+89) 659 (+10) 1773 (+19) 1028 (+6) 212.6K (+3.5K)
github-actions[bot] commented 4 months ago

Go API Changes

# summary
Inferred base version: v0.2.62
Suggested version: v0.2.63
github-actions[bot] commented 4 months ago

Unit Test Coverage

total: (statements) 81.2%

Coverage of changed lines No changes in testable statements.
Coverage diff with base branch No changes in coverage.
codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.16%. Comparing base (340cf4a) to head (1f71327).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #192 +/- ## ======================================= Coverage 76.16% 76.16% ======================================= Files 30 30 Lines 1712 1712 ======================================= Hits 1304 1304 Misses 295 295 Partials 113 113 ``` | [Flag](https://app.codecov.io/gh/swaggest/rest/pull/192/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=swaggest) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/swaggest/rest/pull/192/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=swaggest) | `76.16% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=swaggest#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 4 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-4 1.10µs ± 4% 1.12µs ± 3% ~ (p=0.331 n=6+6) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 517ns ± 7% 505ns ± 3% ~ (p=0.180 n=6+6) DecoderFunc_Decode-4 1.57µs ±11% 1.46µs ± 1% ~ (p=0.420 n=6+6) Decoder_Decode_json-4 18.4µs ± 1% 19.2µs ± 3% +4.27% (p=0.002 n=6+6) Decoder_Decode_queryObject-4 3.92µs ± 0% 4.09µs ± 3% +4.38% (p=0.002 n=6+6) Decoder_Decode_jsonParam-4 1.51µs ± 2% 1.54µs ± 2% +2.25% (p=0.030 n=6+6) DecoderFactory_SetDecoderFunc-4 1.32µs ± 3% 1.30µs ± 0% ~ (p=0.078 n=6+5) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 11.4µs ± 1% 11.4µs ± 1% ~ (p=0.135 n=5+5) Middleware_control-4 2.82µs ± 7% 3.00µs ± 8% ~ (p=0.247 n=5+6) name old alloc/op new alloc/op delta pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-4 2.46kB ± 0% 2.46kB ± 0% ~ (all equal) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 440B ± 0% 440B ± 0% ~ (all equal) DecoderFunc_Decode-4 1.51kB ± 0% 1.51kB ± 0% ~ (all equal) Decoder_Decode_json-4 12.3kB ± 0% 12.3kB ± 0% ~ (all equal) Decoder_Decode_queryObject-4 2.00kB ± 0% 2.00kB ± 0% ~ (all equal) Decoder_Decode_jsonParam-4 736B ± 0% 736B ± 0% ~ (all equal) DecoderFactory_SetDecoderFunc-4 1.02kB ± 0% 1.02kB ± 0% ~ (all equal) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 1.30kB ± 4% 1.34kB ± 9% ~ (p=0.240 n=6+6) Middleware_control-4 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-4 8.00 ± 0% 8.00 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 4.00 ± 0% 4.00 ± 0% ~ (all equal) DecoderFunc_Decode-4 12.0 ± 0% 12.0 ± 0% ~ (all equal) Decoder_Decode_json-4 177 ± 0% 177 ± 0% ~ (all equal) Decoder_Decode_queryObject-4 36.0 ± 0% 36.0 ± 0% ~ (all equal) Decoder_Decode_jsonParam-4 12.0 ± 0% 12.0 ± 0% ~ (all equal) DecoderFactory_SetDecoderFunc-4 16.0 ± 0% 16.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 11.0 ± 0% 11.0 ± 0% ~ (all equal) Middleware_control-4 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-4 1.12µs ± 3% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 505ns ± 3% DecoderFunc_Decode-4 1.46µs ± 1% Decoder_Decode_json-4 19.2µs ± 3% Decoder_Decode_queryObject-4 4.09µs ± 3% Decoder_Decode_jsonParam-4 1.54µs ± 2% DecoderFactory_SetDecoderFunc-4 1.30µs ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 11.4µs ± 1% Middleware_control-4 3.00µs ± 8% name alloc/op pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-4 2.46kB ± 0% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 440B ± 0% DecoderFunc_Decode-4 1.51kB ± 0% Decoder_Decode_json-4 12.3kB ± 0% Decoder_Decode_queryObject-4 2.00kB ± 0% Decoder_Decode_jsonParam-4 736B ± 0% DecoderFactory_SetDecoderFunc-4 1.02kB ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 1.34kB ± 9% Middleware_control-4 11.2kB ± 0% name allocs/op pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-4 8.00 ± 0% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 4.00 ± 0% DecoderFunc_Decode-4 12.0 ± 0% Decoder_Decode_json-4 177 ± 0% Decoder_Decode_queryObject-4 36.0 ± 0% Decoder_Decode_jsonParam-4 12.0 ± 0% DecoderFactory_SetDecoderFunc-4 16.0 ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 11.0 ± 0% Middleware_control-4 9.00 ± 0% ```
github-actions[bot] commented 4 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-4 16.2µs ± 4% 15.8µs ± 0% ~ (p=0.905 n=5+4) _directGzipHead-4 16.1µs ± 8% 15.8µs ± 1% ~ (p=1.000 n=5+5) _noDirectGzip-4 91.3µs ± 1% 91.2µs ± 0% ~ (p=1.000 n=5+5) _directGzip_decode-4 326µs ± 2% 323µs ± 1% ~ (p=0.222 n=5+5) _noDirectGzip_decode-4 91.4µs ± 1% 92.4µs ± 5% ~ (p=1.000 n=5+5) _jsonBody-4 34.6µs ± 5% 34.3µs ± 1% ~ (p=1.000 n=5+5) _jsonBodyValidation-4 39.6µs ± 1% 40.0µs ± 2% +1.15% (p=0.032 n=5+5) _outputHeaders-4 16.3µs ± 0% 16.4µs ± 1% ~ (p=0.151 n=5+5) _requestResponseMapping-4 33.8µs ± 3% 34.1µs ± 1% ~ (p=0.421 n=5+5) _validation-4 36.6µs ± 0% 36.8µs ± 1% ~ (p=0.151 n=5+5) _noValidation-4 25.4µs ± 0% 25.6µs ± 1% ~ (p=0.190 n=4+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 16.2µs ± 0% 16.3µs ± 1% ~ (p=0.556 n=4+5) _directGzipHead-4 16.0µs ± 0% 16.6µs ± 8% +3.31% (p=0.008 n=5+5) _noDirectGzip-4 91.6µs ± 1% 91.7µs ± 1% ~ (p=1.000 n=5+5) _directGzip_decode-4 326µs ± 1% 324µs ± 0% ~ (p=0.056 n=5+5) _noDirectGzip_decode-4 91.7µs ± 1% 91.6µs ± 1% ~ (p=0.841 n=5+5) _htmlResponse-4 29.1µs ± 0% 29.1µs ± 1% ~ (p=1.000 n=5+5) _jsonBodyManual-4 20.5µs ± 1% 20.4µs ± 0% ~ (p=0.389 n=5+5) _jsonBody-4 30.7µs ± 1% 30.9µs ± 1% ~ (p=0.222 n=5+5) _jsonBodyValidation-4 39.9µs ± 1% 39.9µs ± 2% ~ (p=0.841 n=5+5) _outputHeaders-4 28.6µs ± 1% 28.9µs ± 1% +0.72% (p=0.032 n=5+5) _requestResponseMapping-4 33.8µs ± 2% 34.1µs ± 2% ~ (p=0.222 n=5+5) _validation-4 36.3µs ± 1% 36.2µs ± 2% ~ (p=0.841 n=5+5) _noValidation-4 25.5µs ± 1% 25.8µs ± 1% +1.08% (p=0.048 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 17.7µs ± 1% 18.0µs ± 1% +1.58% (p=0.024 n=5+5) _ok-4 18.5µs ± 8% 18.1µs ± 0% ~ (p=0.730 n=5+4) _invalidBody-4 26.3µs ± 4% 26.5µs ± 4% ~ (p=0.690 n=5+5) name old 50%:ms new 50%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 0.71 ±10% 0.71 ± 6% ~ (p=0.421 n=5+5) _directGzipHead-4 0.69 ± 7% 0.70 ± 8% ~ (p=0.841 n=5+5) _noDirectGzip-4 4.21 ± 4% 4.11 ± 4% ~ (p=0.151 n=5+5) _directGzip_decode-4 10.6 ±10% 10.5 ±10% ~ (p=0.841 n=5+5) _noDirectGzip_decode-4 4.16 ± 3% 4.21 ± 3% ~ (p=0.421 n=5+5) _jsonBody-4 1.43 ± 3% 1.42 ± 4% ~ (p=0.587 n=5+5) _jsonBodyValidation-4 1.65 ± 5% 1.65 ± 4% ~ (p=1.000 n=5+5) _outputHeaders-4 0.72 ± 5% 0.71 ± 8% ~ (p=0.841 n=5+5) _requestResponseMapping-4 1.34 ± 4% 1.35 ± 5% ~ (p=0.841 n=5+5) _validation-4 1.47 ± 4% 1.51 ± 4% ~ (p=0.151 n=5+5) _noValidation-4 1.05 ± 7% 1.03 ± 9% ~ (p=0.587 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 0.72 ± 4% 0.72 ± 7% ~ (p=0.690 n=5+5) _directGzipHead-4 0.71 ± 7% 0.72 ± 8% ~ (p=0.841 n=5+5) _noDirectGzip-4 4.17 ± 7% 4.19 ± 7% ~ (p=0.841 n=5+5) _directGzip_decode-4 11.2 ±10% 10.7 ± 8% ~ (p=0.310 n=5+5) _noDirectGzip_decode-4 4.22 ± 5% 4.13 ± 3% ~ (p=0.151 n=5+5) _htmlResponse-4 1.26 ± 7% 1.25 ± 5% ~ (p=1.000 n=5+5) _jsonBodyManual-4 0.90 ± 5% 0.89 ± 9% ~ (p=0.548 n=5+5) _jsonBody-4 1.26 ± 3% 1.28 ± 5% ~ (p=0.635 n=5+5) _jsonBodyValidation-4 1.61 ± 7% 1.55 ± 3% ~ (p=0.175 n=5+5) _outputHeaders-4 1.17 ± 7% 1.16 ± 4% ~ (p=0.841 n=5+5) _requestResponseMapping-4 1.35 ± 6% 1.38 ± 5% ~ (p=0.310 n=5+5) _validation-4 1.51 ± 5% 1.47 ± 5% ~ (p=0.310 n=5+5) _noValidation-4 1.06 ± 4% 1.06 ± 5% ~ (p=0.881 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 0.77 ± 3% 0.80 ± 6% ~ (p=0.421 n=5+5) _ok-4 0.83 ± 5% 0.78 ± 3% -6.24% (p=0.016 n=5+5) _invalidBody-4 1.09 ± 6% 1.13 ± 7% ~ (p=0.222 n=5+5) name old 90%:ms new 90%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 1.49 ± 8% 1.44 ± 4% ~ (p=0.310 n=5+5) _directGzipHead-4 1.45 ± 2% 1.45 ± 3% ~ (p=0.690 n=5+5) _noDirectGzip-4 8.67 ± 4% 8.77 ± 5% ~ (p=0.595 n=5+5) _directGzip_decode-4 31.2 ±14% 30.9 ±11% ~ (p=0.690 n=5+5) _noDirectGzip_decode-4 8.61 ± 3% 8.80 ± 6% ~ (p=0.548 n=5+5) _jsonBody-4 3.17 ± 2% 3.20 ± 5% ~ (p=0.905 n=4+5) _jsonBodyValidation-4 3.70 ± 7% 3.80 ± 1% ~ (p=0.651 n=5+5) _outputHeaders-4 1.49 ± 8% 1.46 ± 3% ~ (p=0.548 n=5+5) _requestResponseMapping-4 3.16 ± 5% 3.22 ± 5% ~ (p=0.548 n=5+5) _validation-4 3.40 ± 3% 3.36 ± 2% ~ (p=0.690 n=5+5) _noValidation-4 2.43 ± 6% 2.44 ± 6% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 1.47 ±10% 1.45 ± 4% ~ (p=0.841 n=5+5) _directGzipHead-4 1.49 ± 6% 1.47 ± 8% ~ (p=0.730 n=5+5) _noDirectGzip-4 8.66 ± 3% 8.60 ± 4% ~ (p=0.548 n=5+5) _directGzip_decode-4 30.7 ± 5% 33.1 ± 3% +7.75% (p=0.016 n=5+5) _noDirectGzip_decode-4 8.49 ± 4% 8.71 ± 4% ~ (p=0.151 n=5+5) _htmlResponse-4 2.70 ± 6% 2.68 ± 4% ~ (p=0.690 n=5+5) _jsonBodyManual-4 1.86 ± 4% 1.83 ± 4% ~ (p=0.222 n=5+5) _jsonBody-4 2.85 ± 4% 2.88 ± 3% ~ (p=0.881 n=5+5) _jsonBodyValidation-4 3.71 ± 3% 3.69 ± 6% ~ (p=0.841 n=5+5) _outputHeaders-4 2.75 ± 7% 2.76 ± 7% ~ (p=1.000 n=5+5) _requestResponseMapping-4 3.14 ± 4% 3.21 ± 7% ~ (p=0.421 n=5+5) _validation-4 3.32 ± 2% 3.29 ± 3% ~ (p=0.690 n=5+5) _noValidation-4 2.43 ± 4% 2.41 ± 3% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 1.57 ± 2% 1.62 ± 2% +3.02% (p=0.032 n=5+5) _ok-4 1.65 ± 6% 1.59 ± 2% ~ (p=0.690 n=5+5) _invalidBody-4 2.59 ± 7% 2.48 ± 4% ~ (p=0.310 n=5+5) name old 99%:ms new 99%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 2.49 ±13% 2.41 ±17% ~ (p=0.548 n=5+5) _directGzipHead-4 2.51 ±18% 2.41 ± 2% ~ (p=1.000 n=5+5) _noDirectGzip-4 13.3 ± 7% 13.2 ± 6% ~ (p=0.881 n=5+5) _directGzip_decode-4 60.3 ±13% 60.2 ±13% ~ (p=1.000 n=5+5) _noDirectGzip_decode-4 12.9 ± 2% 13.8 ±20% ~ (p=0.690 n=5+5) _jsonBody-4 5.27 ±10% 4.97 ± 3% ~ (p=0.151 n=5+5) _jsonBodyValidation-4 6.10 ± 6% 6.46 ± 7% ~ (p=0.095 n=5+5) _outputHeaders-4 2.54 ± 2% 2.52 ± 4% ~ (p=0.841 n=5+5) _requestResponseMapping-4 5.64 ± 6% 5.52 ± 6% ~ (p=0.548 n=5+5) _validation-4 6.20 ± 6% 6.13 ± 5% ~ (p=1.000 n=5+5) _noValidation-4 4.50 ±23% 4.38 ± 6% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 2.49 ± 6% 2.47 ± 7% ~ (p=0.841 n=5+5) _directGzipHead-4 2.42 ± 4% 2.51 ±16% ~ (p=1.000 n=5+5) _noDirectGzip-4 13.1 ± 2% 13.3 ± 5% ~ (p=0.421 n=5+5) _directGzip_decode-4 55.3 ±11% 60.7 ±12% ~ (p=0.095 n=5+5) _noDirectGzip_decode-4 13.6 ± 6% 13.3 ± 5% ~ (p=0.421 n=5+5) _htmlResponse-4 4.63 ± 8% 4.38 ± 4% ~ (p=0.151 n=5+5) _jsonBodyManual-4 3.16 ± 4% 3.18 ± 5% ~ (p=1.000 n=5+5) _jsonBody-4 5.12 ± 5% 5.46 ± 9% +6.53% (p=0.040 n=5+5) _jsonBodyValidation-4 6.69 ± 2% 6.60 ± 6% ~ (p=0.690 n=5+5) _outputHeaders-4 4.62 ± 4% 4.66 ±11% ~ (p=1.000 n=5+5) _requestResponseMapping-4 5.07 ± 8% 5.36 ±11% ~ (p=0.222 n=5+5) _validation-4 5.51 ±13% 5.63 ± 5% ~ (p=0.310 n=5+5) _noValidation-4 3.95 ± 4% 4.18 ± 8% ~ (p=0.095 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 2.57 ± 6% 2.58 ± 3% ~ (p=0.841 n=5+5) _ok-4 2.99 ±21% 2.64 ± 8% -11.75% (p=0.032 n=5+5) _invalidBody-4 4.42 ±11% 4.47 ± 7% ~ (p=0.690 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-4 4.88 ±37% 4.78 ±89% ~ (p=0.421 n=5+5) _directGzipHead-4 5.30 ±50% 4.16 ±24% ~ (p=0.095 n=5+5) _noDirectGzip-4 17.8 ± 7% 16.8 ± 4% ~ (p=0.056 n=5+5) _directGzip_decode-4 89.6 ±18% 84.7 ±19% ~ (p=0.690 n=5+5) _noDirectGzip_decode-4 17.8 ±14% 16.6 ± 3% ~ (p=0.413 n=5+4) _jsonBody-4 8.19 ±23% 7.72 ±16% ~ (p=0.841 n=5+5) _jsonBodyValidation-4 8.99 ± 7% 9.47 ±13% ~ (p=0.421 n=5+5) _outputHeaders-4 5.19 ±15% 5.14 ±12% ~ (p=0.841 n=5+5) _requestResponseMapping-4 9.01 ± 8% 8.75 ±12% ~ (p=0.690 n=5+5) _validation-4 9.38 ± 8% 9.30 ± 5% ~ (p=0.841 n=5+5) _noValidation-4 8.05 ±51% 8.48 ±21% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 5.12 ±38% 4.25 ±18% ~ (p=0.310 n=5+5) _directGzipHead-4 4.81 ±16% 5.74 ±92% ~ (p=1.000 n=5+5) _noDirectGzip-4 17.4 ± 6% 17.0 ± 7% ~ (p=0.460 n=5+5) _directGzip_decode-4 80.8 ±22% 83.1 ±26% ~ (p=0.841 n=5+5) _noDirectGzip_decode-4 19.6 ±10% 18.3 ± 8% ~ (p=0.310 n=5+5) _htmlResponse-4 7.23 ±28% 8.18 ±21% ~ (p=0.310 n=5+5) _jsonBodyManual-4 6.15 ± 9% 5.84 ±11% ~ (p=0.690 n=5+5) _jsonBody-4 8.83 ± 9% 9.41 ± 8% ~ (p=0.151 n=5+5) _jsonBodyValidation-4 10.2 ±10% 10.2 ± 5% ~ (p=0.595 n=5+5) _outputHeaders-4 7.86 ±11% 8.08 ±19% ~ (p=0.841 n=5+5) _requestResponseMapping-4 8.13 ±14% 8.90 ±12% ~ (p=0.310 n=5+5) _validation-4 8.43 ±13% 9.16 ± 9% ~ (p=0.310 n=5+5) _noValidation-4 7.03 ±18% 7.10 ±25% ~ (p=0.841 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 4.01 ±14% 4.46 ± 6% ~ (p=0.222 n=5+5) _ok-4 5.95 ±71% 4.70 ±13% ~ (p=0.421 n=5+5) _invalidBody-4 6.98 ±42% 6.90 ±31% ~ (p=1.000 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-4 630 ± 0% 630 ± 0% ~ (all equal) _directGzipHead-4 174 ± 0% 174 ± 0% ~ (all equal) _noDirectGzip-4 1.03k ± 0% 1.03k ± 0% ~ (all equal) _directGzip_decode-4 630 ± 0% 630 ± 0% ~ (all equal) _noDirectGzip_decode-4 1.03k ± 0% 1.03k ± 0% ~ (all equal) _jsonBody-4 199 ± 0% 199 ± 0% ~ (all equal) _jsonBodyValidation-4 185 ± 0% 185 ± 0% ~ (all equal) _outputHeaders-4 146 ± 0% 146 ± 0% ~ (all equal) _requestResponseMapping-4 94.0 ± 0% 94.0 ± 0% ~ (all equal) _validation-4 168 ± 0% 168 ± 0% ~ (all equal) _noValidation-4 168 ± 0% 168 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 638 ± 0% 638 ± 0% ~ (all equal) _directGzipHead-4 182 ± 0% 182 ± 0% ~ (all equal) _noDirectGzip-4 1.04k ± 0% 1.04k ± 0% ~ (all equal) _directGzip_decode-4 638 ± 0% 638 ± 0% ~ (all equal) _noDirectGzip_decode-4 1.04k ± 0% 1.04k ± 0% ~ (all equal) _htmlResponse-4 355 ± 0% 355 ± 0% ~ (all equal) _jsonBodyManual-4 207 ± 0% 207 ± 0% ~ (all equal) _jsonBody-4 207 ± 0% 207 ± 0% ~ (all equal) _jsonBodyValidation-4 193 ± 0% 193 ± 0% ~ (all equal) _outputHeaders-4 214 ± 0% 214 ± 0% ~ (all equal) _requestResponseMapping-4 108 ± 0% 108 ± 0% ~ (all equal) _validation-4 176 ± 0% 176 ± 0% ~ (all equal) _noValidation-4 176 ± 0% 176 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 322 ± 0% 322 ± 0% ~ (all equal) _ok-4 344 ± 0% 344 ± 0% ~ (all equal) _invalidBody-4 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-4 103 ± 0% 103 ± 0% ~ (all equal) _directGzipHead-4 104 ± 0% 104 ± 0% ~ (all equal) _noDirectGzip-4 117 ± 0% 117 ± 0% ~ (all equal) _directGzip_decode-4 116 ± 0% 116 ± 0% ~ (all equal) _noDirectGzip_decode-4 130 ± 0% 130 ± 0% ~ (all equal) _jsonBody-4 188 ± 0% 188 ± 0% ~ (all equal) _jsonBodyValidation-4 192 ± 0% 192 ± 0% ~ (all equal) _outputHeaders-4 77.0 ± 0% 77.0 ± 0% ~ (all equal) _requestResponseMapping-4 169 ± 0% 169 ± 0% ~ (all equal) _validation-4 170 ± 0% 170 ± 0% ~ (all equal) _noValidation-4 173 ± 0% 173 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 103 ± 0% 103 ± 0% ~ (all equal) _directGzipHead-4 104 ± 0% 104 ± 0% ~ (all equal) _noDirectGzip-4 117 ± 0% 117 ± 0% ~ (all equal) _directGzip_decode-4 116 ± 0% 116 ± 0% ~ (all equal) _noDirectGzip_decode-4 130 ± 0% 130 ± 0% ~ (all equal) _htmlResponse-4 108 ± 0% 108 ± 0% ~ (all equal) _jsonBodyManual-4 195 ± 0% 195 ± 0% ~ (all equal) _jsonBody-4 188 ± 0% 188 ± 0% ~ (all equal) _jsonBodyValidation-4 192 ± 0% 192 ± 0% ~ (all equal) _outputHeaders-4 88.0 ± 0% 88.0 ± 0% ~ (all equal) _requestResponseMapping-4 169 ± 0% 169 ± 0% ~ (all equal) _validation-4 170 ± 0% 170 ± 0% ~ (all equal) _noValidation-4 173 ± 0% 173 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 74.0 ± 0% 74.0 ± 0% ~ (all equal) _ok-4 74.0 ± 0% 74.0 ± 0% ~ (all equal) _invalidBody-4 137 ± 0% 137 ± 0% ~ (all equal) name old rps new rps delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 61.8k ± 3% 63.1k ± 0% ~ (p=0.905 n=5+4) _directGzipHead-4 62.3k ± 8% 63.1k ± 1% ~ (p=1.000 n=5+5) _noDirectGzip-4 11.0k ± 1% 11.0k ± 0% ~ (p=1.000 n=5+5) _directGzip_decode-4 3.06k ± 2% 3.09k ± 1% ~ (p=0.222 n=5+5) _noDirectGzip_decode-4 10.9k ± 1% 10.8k ± 5% ~ (p=1.000 n=5+5) _jsonBody-4 28.9k ± 5% 29.2k ± 1% ~ (p=1.000 n=5+5) _jsonBodyValidation-4 25.3k ± 1% 25.0k ± 2% -1.13% (p=0.032 n=5+5) _outputHeaders-4 61.4k ± 0% 61.1k ± 1% ~ (p=0.151 n=5+5) _requestResponseMapping-4 29.6k ± 3% 29.3k ± 1% ~ (p=0.421 n=5+5) _validation-4 27.3k ± 0% 27.2k ± 1% ~ (p=0.151 n=5+5) _noValidation-4 39.3k ± 0% 39.0k ± 1% ~ (p=0.190 n=4+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 60.9k ± 6% 61.5k ± 1% ~ (p=1.000 n=5+5) _directGzipHead-4 62.3k ± 0% 60.4k ± 8% -3.04% (p=0.008 n=5+5) _noDirectGzip-4 10.9k ± 1% 10.9k ± 1% ~ (p=0.968 n=5+5) _directGzip_decode-4 3.07k ± 1% 3.09k ± 0% ~ (p=0.056 n=5+5) _noDirectGzip_decode-4 10.9k ± 1% 10.9k ± 1% ~ (p=0.841 n=5+5) _htmlResponse-4 34.4k ± 0% 34.4k ± 1% ~ (p=1.000 n=5+5) _jsonBodyManual-4 48.9k ± 1% 48.9k ± 0% ~ (p=0.421 n=5+5) _jsonBody-4 32.6k ± 1% 32.3k ± 1% ~ (p=0.222 n=5+5) _jsonBodyValidation-4 25.0k ± 1% 25.1k ± 2% ~ (p=0.841 n=5+5) _outputHeaders-4 34.9k ± 1% 34.7k ± 1% -0.71% (p=0.032 n=5+5) _requestResponseMapping-4 29.6k ± 2% 29.3k ± 2% ~ (p=0.222 n=5+5) _validation-4 27.5k ± 1% 27.6k ± 2% ~ (p=0.841 n=5+5) _noValidation-4 39.2k ± 1% 38.8k ± 1% -1.08% (p=0.048 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 56.5k ± 1% 55.6k ± 1% -1.55% (p=0.032 n=5+5) _ok-4 54.2k ± 8% 55.3k ± 0% ~ (p=0.698 n=5+4) _invalidBody-4 38.0k ± 4% 37.8k ± 4% ~ (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-4 3.86kB ± 0% 3.86kB ± 0% ~ (p=0.508 n=5+5) _directGzipHead-4 3.85kB ± 0% 3.85kB ± 0% ~ (p=0.698 n=5+5) _noDirectGzip-4 6.73kB ±20% 6.51kB ±15% ~ (p=0.690 n=5+5) _directGzip_decode-4 404kB ± 0% 404kB ± 0% ~ (p=0.310 n=5+5) _noDirectGzip_decode-4 5.97kB ±17% 5.72kB ±18% ~ (p=0.421 n=5+5) _jsonBody-4 13.2kB ± 0% 13.2kB ± 0% ~ (p=0.881 n=5+5) _jsonBodyValidation-4 19.1kB ± 0% 19.0kB ± 0% ~ (p=0.421 n=5+5) _outputHeaders-4 3.58kB ± 0% 3.57kB ± 0% ~ (p=0.238 n=5+5) _requestResponseMapping-4 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.897 n=5+5) _validation-4 16.6kB ± 0% 16.6kB ± 0% -0.07% (p=0.024 n=5+5) _noValidation-4 7.79kB ± 0% 7.79kB ± 0% ~ (p=0.167 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 3.87kB ± 0% 3.87kB ± 0% ~ (p=0.079 n=5+5) _directGzipHead-4 3.87kB ± 0% 3.87kB ± 0% ~ (p=0.540 n=5+5) _noDirectGzip-4 7.20kB ±21% 6.81kB ±26% ~ (p=0.310 n=5+5) _directGzip_decode-4 404kB ± 0% 404kB ± 0% ~ (p=0.095 n=5+5) _noDirectGzip_decode-4 6.49kB ± 6% 6.50kB ±13% ~ (p=0.643 n=5+5) _htmlResponse-4 8.07kB ± 0% 8.07kB ± 0% ~ (p=0.238 n=4+5) _jsonBodyManual-4 4.48kB ± 0% 4.48kB ± 0% ~ (p=0.905 n=5+5) _jsonBody-4 10.2kB ± 0% 10.3kB ± 0% ~ (p=0.206 n=5+5) _jsonBodyValidation-4 19.1kB ± 0% 19.1kB ± 0% ~ (p=0.619 n=5+4) _outputHeaders-4 10.4kB ± 0% 10.4kB ± 0% ~ (p=0.770 n=5+5) _requestResponseMapping-4 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.206 n=5+5) _validation-4 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.635 n=5+5) _noValidation-4 7.82kB ± 0% 7.83kB ± 0% +0.06% (p=0.048 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 4.65kB ± 0% 4.65kB ± 0% ~ (p=0.452 n=5+5) _ok-4 4.58kB ± 2% 4.56kB ± 0% ~ (p=0.603 n=5+4) _invalidBody-4 8.27kB ± 0% 8.27kB ± 0% ~ (p=0.943 n=4+4) name old allocs/op new allocs/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 42.0 ± 0% 42.0 ± 0% ~ (all equal) _directGzipHead-4 42.0 ± 0% 42.0 ± 0% ~ (all equal) _noDirectGzip-4 49.2 ± 4% 49.2 ± 4% ~ (p=1.000 n=5+5) _directGzip_decode-4 504 ± 0% 504 ± 0% ~ (p=0.333 n=5+5) _noDirectGzip_decode-4 50.0 ± 0% 50.0 ± 0% ~ (all equal) _jsonBody-4 128 ± 0% 128 ± 0% ~ (all equal) _jsonBodyValidation-4 186 ± 0% 186 ± 0% ~ (all equal) _outputHeaders-4 36.0 ± 0% 36.0 ± 0% ~ (all equal) _requestResponseMapping-4 124 ± 0% 124 ± 0% ~ (all equal) _validation-4 155 ± 0% 155 ± 0% ~ (all equal) _noValidation-4 91.0 ± 0% 91.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 43.0 ± 0% 43.0 ± 0% ~ (all equal) _directGzipHead-4 43.0 ± 0% 43.0 ± 0% ~ (all equal) _noDirectGzip-4 50.2 ± 4% 50.2 ± 4% ~ (p=1.000 n=5+5) _directGzip_decode-4 505 ± 0% 504 ± 0% ~ (p=0.079 n=5+5) _noDirectGzip_decode-4 51.0 ± 0% 51.0 ± 0% ~ (all equal) _htmlResponse-4 144 ± 0% 144 ± 0% ~ (all equal) _jsonBodyManual-4 48.0 ± 0% 48.0 ± 0% ~ (all equal) _jsonBody-4 99.0 ± 0% 99.0 ± 0% ~ (all equal) _jsonBodyValidation-4 187 ± 0% 187 ± 0% ~ (all equal) _outputHeaders-4 112 ± 0% 112 ± 0% ~ (all equal) _requestResponseMapping-4 125 ± 0% 125 ± 0% ~ (all equal) _validation-4 155 ± 0% 155 ± 0% ~ (p=0.333 n=5+4) _noValidation-4 92.0 ± 0% 92.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 53.0 ± 0% 53.0 ± 0% ~ (all equal) _ok-4 49.0 ± 0% 49.0 ± 0% ~ (all equal) _invalidBody-4 97.0 ± 0% 97.0 ± 0% ~ (all equal) ```