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 example for dynamic schema and improve docs #170

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 111 (+1) 8325 (+142) 6037 (+106) 574 (+8) 1714 (+28) 1011 (+13) 202.2K (+3.3K)
Go (test) 54 (+1) 6345 (+24) 4862 (+18) 291 1192 (+6) 186 174.8K (+540B)
JSON 3 1611 (+33) 1611 (+33) 0 0 0 63.8K (+1.5K)
Makefile 3 127 91 (-1) 12 (+1) 24 11 4K (+1B)
Markdown 7 641 (+48) 484 (+36) 0 157 (+12) 0 21.1K (+1.2K)
YAML 10 738 (+2) 633 (+2) 46 59 0 23.1K (+125B)
github-actions[bot] commented 10 months ago

Go API Changes

# github.com/swaggest/rest/request
## compatible changes
EmbeddedSetter: added

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

Unit Test Coverage

total: (statements) 81.1% changed lines: (statements) 33.3%, coverage is less than 90.0%, consider testing the changes more thoroughly

Coverage of changed lines | File | Function | Coverage | |-------------------------|-------------------------|----------| | Total | | 33.3% | | request/decoder.go | | 0.0% | | request/decoder.go:38 | SetRequest | 0.0% | | request/decoder.go:43 | Request | 0.0% | | response/encoder.go | | 35.5% | | response/encoder.go:67 | setupHeadersEncoder | 100.0% | | response/encoder.go:113 | setupCookiesEncoder | 100.0% | | response/encoder.go:173 | SetupOutput | 72.7% | | response/encoder.go:410 | whiteHeader | 33.3% | | response/encoder.go:348 | WriteSuccessfulResponse | 26.3% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |---------------------|-------------------------|---------------|------------------| | Total | | 81.5% | 81.1% (-0.4%) | | request/decoder.go | Request | no function | 0.0% | | request/decoder.go | SetRequest | no function | 0.0% | | response/encoder.go | SetupOutput | 94.4% | 84.0% (-10.4%) | | response/encoder.go | WriteSuccessfulResponse | 60.9% | 54.2% (-6.7%) | | response/encoder.go | whiteHeader | 88.2% | 80.0% (-8.2%) |
codecov[bot] commented 10 months ago

Codecov Report

Merging #170 (ff5d596) into master (2242740) will decrease coverage by 0.59%. The diff coverage is 4.76%.

@@            Coverage Diff             @@
##           master     #170      +/-   ##
==========================================
- Coverage   76.68%   76.09%   -0.59%     
==========================================
  Files          30       30              
  Lines        1677     1690      +13     
==========================================
  Hits         1286     1286              
- Misses        284      293       +9     
- Partials      107      111       +4     
Flag Coverage Δ
unittests 76.09% <4.76%> (-0.59%) :arrow_down:

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

Files Changed Coverage Δ
nethttp/wrapper.go 87.50% <0.00%> (ø)
request/decoder.go 62.90% <0.00%> (-2.10%) :arrow_down:
response/encoder.go 65.06% <5.55%> (-3.01%) :arrow_down:

: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.65µs ± 8% 1.74µs ±19% ~ (p=0.699 n=6+6) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 828ns ± 8% 806ns ± 5% ~ (p=0.818 n=6+6) DecoderFunc_Decode-2 2.27µs ± 5% 2.33µs ± 8% ~ (p=0.310 n=6+6) Decoder_Decode_json-2 24.1µs ± 7% 25.9µs ± 3% +7.58% (p=0.015 n=6+6) Decoder_Decode_queryObject-2 5.18µs ± 6% 4.97µs ± 1% ~ (p=0.132 n=6+6) Decoder_Decode_jsonParam-2 1.99µs ± 6% 1.88µs ± 2% -5.34% (p=0.011 n=6+6) DecoderFactory_SetDecoderFunc-2 1.94µs ± 5% 1.76µs ± 2% -9.25% (p=0.002 n=6+6) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.8µs ± 7% 11.6µs ±11% ~ (p=0.589 n=6+6) Middleware_control-2 3.79µs ± 3% 4.29µs ± 4% +12.98% (p=0.004 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.14kB ± 3% 1.15kB ± 3% ~ (p=0.513 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.74µs ±19% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 806ns ± 5% DecoderFunc_Decode-2 2.33µs ± 8% Decoder_Decode_json-2 25.9µs ± 3% Decoder_Decode_queryObject-2 4.97µs ± 1% Decoder_Decode_jsonParam-2 1.88µs ± 2% DecoderFactory_SetDecoderFunc-2 1.76µs ± 2% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.6µs ±11% Middleware_control-2 4.29µs ± 4% 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 ± 3% 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 21.6µs ± 3% 21.3µs ± 1% ~ (p=0.413 n=5+4) _directGzipHead-2 21.5µs ± 3% 21.8µs ±12% ~ (p=0.548 n=5+5) _noDirectGzip-2 132µs ± 4% 131µs ± 1% ~ (p=1.000 n=5+5) _directGzip_decode-2 475µs ± 2% 475µs ± 1% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 131µs ± 1% 131µs ± 1% ~ (p=0.690 n=5+5) _jsonBody-2 44.5µs ± 1% 44.6µs ± 2% ~ (p=0.841 n=5+5) _jsonBodyValidation-2 53.3µs ± 3% 53.7µs ± 2% ~ (p=0.548 n=5+5) _outputHeaders-2 22.4µs ± 3% 22.5µs ± 2% ~ (p=0.310 n=5+5) _requestResponseMapping-2 47.1µs ± 1% 47.0µs ± 1% ~ (p=0.690 n=5+5) _validation-2 50.4µs ± 1% 50.0µs ± 1% ~ (p=0.095 n=5+5) _noValidation-2 34.5µs ± 2% 33.4µs ± 3% ~ (p=0.056 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 22.1µs ± 0% 21.9µs ± 1% ~ (p=0.343 n=4+4) _directGzipHead-2 22.3µs ± 2% 21.7µs ± 1% -2.55% (p=0.008 n=5+5) _noDirectGzip-2 123µs ± 1% 120µs ± 1% -1.69% (p=0.008 n=5+5) _directGzip_decode-2 468µs ± 2% 465µs ± 3% ~ (p=0.421 n=5+5) _noDirectGzip_decode-2 123µs ± 1% 121µs ± 2% -1.45% (p=0.016 n=5+5) _htmlResponse-2 39.4µs ± 2% 39.9µs ± 3% ~ (p=0.421 n=5+5) _jsonBodyManual-2 27.4µs ± 2% 27.3µs ± 1% ~ (p=0.690 n=5+5) _jsonBody-2 39.8µs ± 1% 40.7µs ± 2% +2.18% (p=0.032 n=5+5) _jsonBodyValidation-2 53.5µs ± 1% 53.5µs ± 1% ~ (p=0.841 n=5+5) _outputHeaders-2 38.2µs ± 1% 37.8µs ± 1% -1.05% (p=0.032 n=5+5) _requestResponseMapping-2 45.7µs ± 1% 45.6µs ± 2% ~ (p=1.000 n=5+5) _validation-2 48.5µs ± 1% 49.1µs ± 2% ~ (p=0.222 n=5+5) _noValidation-2 35.2µs ± 2% 34.8µs ± 3% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 24.4µs ± 1% 24.3µs ± 1% ~ (p=0.310 n=5+5) _ok-2 24.7µs ± 4% 24.7µs ± 6% ~ (p=0.841 n=5+5) _invalidBody-2 35.9µs ± 2% 36.2µs ± 0% ~ (p=0.190 n=5+4) name old 50%:ms new 50%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 1.00 ± 3% 1.03 ± 6% ~ (p=0.286 n=5+5) _directGzipHead-2 1.04 ± 4% 1.01 ± 5% ~ (p=0.222 n=5+5) _noDirectGzip-2 6.48 ± 7% 6.30 ± 2% ~ (p=0.690 n=5+5) _directGzip_decode-2 18.3 ± 4% 18.7 ± 5% ~ (p=0.151 n=5+5) _noDirectGzip_decode-2 6.61 ± 4% 6.50 ± 6% ~ (p=0.841 n=5+5) _jsonBody-2 2.05 ± 3% 2.00 ± 3% ~ (p=0.222 n=5+5) _jsonBodyValidation-2 2.52 ± 6% 2.51 ± 6% ~ (p=0.841 n=5+5) _outputHeaders-2 1.07 ± 6% 1.04 ± 5% ~ (p=0.421 n=5+5) _requestResponseMapping-2 2.05 ± 3% 2.06 ± 5% ~ (p=0.889 n=5+5) _validation-2 2.23 ± 3% 2.23 ± 3% ~ (p=0.690 n=5+5) _noValidation-2 1.55 ± 3% 1.49 ± 6% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 1.07 ± 7% 1.03 ± 4% ~ (p=0.690 n=5+5) _directGzipHead-2 1.05 ± 5% 1.02 ± 4% ~ (p=0.310 n=5+5) _noDirectGzip-2 6.13 ± 3% 5.80 ± 4% ~ (p=0.056 n=5+5) _directGzip_decode-2 18.2 ± 4% 18.1 ± 8% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 5.89 ± 6% 5.77 ± 3% ~ (p=0.841 n=5+5) _htmlResponse-2 1.80 ± 5% 1.77 ± 5% ~ (p=0.841 n=5+5) _jsonBodyManual-2 1.27 ± 3% 1.29 ± 7% ~ (p=0.841 n=5+5) _jsonBody-2 1.80 ± 3% 1.88 ± 8% ~ (p=0.222 n=5+5) _jsonBodyValidation-2 2.44 ± 8% 2.41 ± 2% ~ (p=0.690 n=5+5) _outputHeaders-2 1.65 ± 2% 1.70 ± 5% ~ (p=0.119 n=5+5) _requestResponseMapping-2 1.98 ± 3% 1.99 ± 3% ~ (p=0.690 n=5+5) _validation-2 2.17 ± 7% 2.18 ± 5% ~ (p=0.937 n=5+5) _noValidation-2 1.56 ± 4% 1.55 ± 4% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 1.15 ± 5% 1.14 ± 4% ~ (p=0.690 n=5+5) _ok-2 1.15 ± 7% 1.18 ± 5% ~ (p=0.310 n=5+5) _invalidBody-2 1.56 ± 6% 1.65 ± 5% ~ (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 1.87 ± 6% 1.89 ±10% ~ (p=1.000 n=5+5) _directGzipHead-2 1.79 ± 2% 1.86 ± 4% ~ (p=0.151 n=5+5) _noDirectGzip-2 11.6 ± 6% 11.4 ± 4% ~ (p=0.548 n=5+5) _directGzip_decode-2 39.0 ± 6% 38.4 ± 4% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 11.3 ± 2% 11.2 ± 2% ~ (p=0.635 n=5+5) _jsonBody-2 4.01 ± 3% 4.02 ± 3% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 4.61 ± 4% 4.62 ± 5% ~ (p=0.651 n=5+5) _outputHeaders-2 1.89 ± 8% 1.87 ± 6% ~ (p=0.841 n=5+5) _requestResponseMapping-2 4.18 ± 5% 4.10 ± 4% ~ (p=0.310 n=5+5) _validation-2 4.56 ± 4% 4.35 ± 4% ~ (p=0.056 n=5+5) _noValidation-2 3.26 ± 6% 3.11 ± 4% ~ (p=0.222 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 1.88 ± 4% 1.87 ± 8% ~ (p=0.841 n=5+5) _directGzipHead-2 1.90 ± 7% 1.84 ± 9% ~ (p=0.690 n=5+5) _noDirectGzip-2 10.6 ± 3% 10.5 ± 5% ~ (p=0.730 n=5+5) _directGzip_decode-2 39.1 ±10% 39.8 ± 8% ~ (p=0.730 n=5+5) _noDirectGzip_decode-2 10.8 ± 3% 10.5 ± 2% ~ (p=0.056 n=5+5) _htmlResponse-2 3.51 ± 5% 3.61 ± 3% ~ (p=0.421 n=5+5) _jsonBodyManual-2 2.34 ± 4% 2.29 ± 4% ~ (p=0.452 n=5+5) _jsonBody-2 3.65 ± 7% 3.85 ± 4% ~ (p=0.056 n=5+5) _jsonBodyValidation-2 4.66 ± 1% 4.76 ± 5% ~ (p=0.095 n=5+5) _outputHeaders-2 3.65 ± 3% 3.60 ± 3% ~ (p=0.421 n=5+5) _requestResponseMapping-2 4.22 ± 4% 4.15 ± 4% ~ (p=0.690 n=5+5) _validation-2 4.31 ± 1% 4.32 ± 2% ~ (p=0.452 n=5+5) _noValidation-2 3.22 ± 6% 3.34 ± 9% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 2.07 ± 6% 2.10 ± 5% ~ (p=0.690 n=5+5) _ok-2 2.08 ± 9% 2.15 ± 5% ~ (p=0.222 n=5+5) _invalidBody-2 3.41 ± 8% 3.53 ± 8% ~ (p=0.421 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.17 ±18% 3.07 ±10% ~ (p=0.905 n=5+4) _directGzipHead-2 3.14 ±11% 4.02 ±91% ~ (p=1.000 n=5+5) _noDirectGzip-2 16.2 ±14% 15.2 ± 4% ~ (p=0.222 n=5+5) _directGzip_decode-2 63.5 ± 8% 63.1 ± 2% ~ (p=0.651 n=5+5) _noDirectGzip_decode-2 14.9 ± 3% 15.4 ± 4% +3.58% (p=0.048 n=5+5) _jsonBody-2 5.83 ± 5% 6.06 ±12% ~ (p=0.548 n=5+5) _jsonBodyValidation-2 7.55 ±20% 7.64 ±17% ~ (p=1.000 n=5+5) _outputHeaders-2 3.65 ±26% 3.84 ±18% ~ (p=0.421 n=5+5) _requestResponseMapping-2 10.0 ± 4% 8.8 ±21% ~ (p=0.151 n=5+5) _validation-2 9.08 ±15% 7.50 ± 3% -17.38% (p=0.016 n=5+4) _noValidation-2 6.13 ±17% 5.11 ±16% ~ (p=0.056 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 3.16 ± 6% 3.19 ± 7% ~ (p=0.905 n=5+4) _directGzipHead-2 3.34 ± 5% 3.20 ± 5% ~ (p=0.095 n=5+5) _noDirectGzip-2 14.5 ± 6% 14.3 ± 7% ~ (p=0.690 n=5+5) _directGzip_decode-2 66.0 ± 8% 67.3 ±11% ~ (p=0.841 n=5+5) _noDirectGzip_decode-2 14.4 ± 4% 14.3 ± 4% ~ (p=1.000 n=5+5) _htmlResponse-2 6.60 ±16% 7.44 ±24% ~ (p=0.222 n=5+5) _jsonBodyManual-2 4.60 ±26% 4.48 ±14% ~ (p=0.841 n=5+5) _jsonBody-2 6.05 ±22% 6.56 ±33% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 7.25 ±12% 6.82 ±10% ~ (p=0.421 n=5+5) _outputHeaders-2 5.88 ± 3% 5.77 ±15% ~ (p=0.310 n=5+5) _requestResponseMapping-2 6.27 ±11% 6.68 ±16% ~ (p=0.690 n=5+5) _validation-2 6.75 ±16% 7.04 ±10% ~ (p=0.841 n=5+5) _noValidation-2 6.27 ±21% 5.79 ±10% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 3.47 ± 8% 3.29 ±10% ~ (p=0.246 n=5+5) _ok-2 3.87 ±37% 4.06 ±61% ~ (p=1.000 n=5+5) _invalidBody-2 5.66 ±15% 5.79 ±14% ~ (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-2 5.49 ±28% 8.95 ±94% ~ (p=0.310 n=5+5) _directGzipHead-2 5.11 ±30% 7.64 ±85% ~ (p=0.151 n=5+5) _noDirectGzip-2 21.1 ±15% 20.5 ±21% ~ (p=0.794 n=5+5) _directGzip_decode-2 84.0 ±13% 85.6 ± 5% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 19.5 ±11% 20.2 ±14% ~ (p=0.548 n=5+5) _jsonBody-2 8.34 ±26% 9.37 ±30% ~ (p=0.421 n=5+5) _jsonBodyValidation-2 11.8 ±31% 13.5 ±19% ~ (p=0.548 n=5+5) _outputHeaders-2 9.63 ±20% 10.93 ±12% ~ (p=0.222 n=5+5) _requestResponseMapping-2 16.1 ±46% 13.5 ±11% ~ (p=0.222 n=5+5) _validation-2 13.9 ±15% 13.8 ±15% ~ (p=1.000 n=5+5) _noValidation-2 11.9 ±39% 9.0 ±39% ~ (p=0.222 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 5.37 ±35% 5.07 ±15% ~ (p=0.905 n=5+4) _directGzipHead-2 9.43 ±42% 5.70 ±30% -39.63% (p=0.032 n=5+5) _noDirectGzip-2 18.7 ± 9% 18.5 ±11% ~ (p=1.000 n=5+5) _directGzip_decode-2 83.4 ±14% 90.0 ±20% ~ (p=0.310 n=5+5) _noDirectGzip_decode-2 21.4 ±20% 18.9 ±19% ~ (p=0.151 n=5+5) _htmlResponse-2 12.7 ±12% 12.0 ±41% ~ (p=0.881 n=5+5) _jsonBodyManual-2 10.7 ±16% 9.8 ±38% ~ (p=0.222 n=5+5) _jsonBody-2 10.4 ±35% 12.9 ±32% ~ (p=0.548 n=5+5) _jsonBodyValidation-2 11.9 ±21% 12.3 ±29% ~ (p=1.000 n=5+5) _outputHeaders-2 11.4 ±48% 12.5 ±31% ~ (p=0.690 n=5+5) _requestResponseMapping-2 12.8 ±40% 12.8 ±21% ~ (p=1.000 n=5+5) _validation-2 12.1 ±36% 14.2 ±14% ~ (p=1.000 n=5+5) _noValidation-2 13.2 ±34% 11.2 ±33% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 6.73 ±39% 5.99 ±19% ~ (p=0.548 n=5+5) _ok-2 7.94 ±43% 8.85 ±43% ~ (p=0.690 n=5+5) _invalidBody-2 10.9 ±28% 9.3 ±32% ~ (p=0.310 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 46.3k ± 3% 47.0k ± 1% ~ (p=0.413 n=5+4) _directGzipHead-2 46.6k ± 3% 46.0k ±11% ~ (p=0.548 n=5+5) _noDirectGzip-2 7.59k ± 4% 7.66k ± 1% ~ (p=1.000 n=5+5) _directGzip_decode-2 2.11k ± 2% 2.11k ± 1% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 7.65k ± 1% 7.63k ± 1% ~ (p=0.690 n=5+5) _jsonBody-2 22.5k ± 1% 22.4k ± 2% ~ (p=0.841 n=5+5) _jsonBodyValidation-2 18.8k ± 3% 18.6k ± 2% ~ (p=0.548 n=5+5) _outputHeaders-2 44.6k ± 3% 44.4k ± 2% ~ (p=0.310 n=5+5) _requestResponseMapping-2 21.2k ± 1% 21.3k ± 1% ~ (p=0.841 n=5+5) _validation-2 19.8k ± 1% 20.0k ± 1% ~ (p=0.095 n=5+5) _noValidation-2 29.0k ± 2% 30.0k ± 3% ~ (p=0.056 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 45.3k ± 0% 45.7k ± 1% ~ (p=0.343 n=4+4) _directGzipHead-2 44.9k ± 2% 46.1k ± 1% +2.60% (p=0.008 n=5+5) _noDirectGzip-2 8.16k ± 1% 8.30k ± 1% +1.72% (p=0.008 n=5+5) _directGzip_decode-2 2.14k ± 2% 2.15k ± 3% ~ (p=0.333 n=5+5) _noDirectGzip_decode-2 8.15k ± 1% 8.27k ± 2% +1.47% (p=0.016 n=5+5) _htmlResponse-2 25.4k ± 2% 25.1k ± 3% ~ (p=0.421 n=5+5) _jsonBodyManual-2 36.5k ± 2% 36.6k ± 1% ~ (p=0.690 n=5+5) _jsonBody-2 25.1k ± 1% 24.6k ± 2% -2.12% (p=0.032 n=5+5) _jsonBodyValidation-2 18.7k ± 1% 18.7k ± 1% ~ (p=0.841 n=5+5) _outputHeaders-2 26.2k ± 1% 26.5k ± 1% +1.06% (p=0.032 n=5+5) _requestResponseMapping-2 21.9k ± 1% 21.9k ± 2% ~ (p=0.952 n=5+5) _validation-2 20.6k ± 1% 20.4k ± 2% ~ (p=0.222 n=5+5) _noValidation-2 28.4k ± 2% 28.7k ± 3% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 40.9k ± 1% 41.2k ± 1% ~ (p=0.310 n=5+5) _ok-2 40.6k ± 4% 40.6k ± 6% ~ (p=0.841 n=5+5) _invalidBody-2 27.9k ± 2% 27.4k ± 3% ~ (p=0.095 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.84kB ± 0% 3.84kB ± 0% ~ (p=0.810 n=5+5) _directGzipHead-2 3.84kB ± 0% 3.84kB ± 0% ~ (p=1.000 n=4+5) _noDirectGzip-2 6.60kB ±19% 6.56kB ±15% ~ (p=1.000 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.310 n=5+5) _noDirectGzip_decode-2 5.98kB ± 7% 5.74kB ± 5% ~ (p=0.151 n=5+5) _jsonBody-2 13.1kB ± 0% 13.1kB ± 0% ~ (p=0.270 n=5+5) _jsonBodyValidation-2 18.9kB ± 0% 18.9kB ± 0% ~ (p=0.421 n=5+5) _outputHeaders-2 3.56kB ± 0% 3.56kB ± 0% ~ (p=0.762 n=5+5) _requestResponseMapping-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=1.000 n=5+5) _validation-2 16.5kB ± 0% 16.5kB ± 0% ~ (p=0.810 n=5+5) _noValidation-2 7.75kB ± 0% 7.75kB ± 0% ~ (p=0.460 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 3.88kB ± 0% 3.88kB ± 0% ~ (p=0.238 n=5+4) _directGzipHead-2 3.87kB ± 0% 3.87kB ± 0% -0.04% (p=0.016 n=5+4) _noDirectGzip-2 6.53kB ±17% 6.49kB ±17% ~ (p=1.000 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% -0.04% (p=0.032 n=5+5) _noDirectGzip_decode-2 5.75kB ± 1% 5.76kB ±13% ~ (p=0.690 n=5+5) _htmlResponse-2 8.05kB ± 0% 8.05kB ± 0% ~ (p=1.000 n=5+5) _jsonBodyManual-2 4.48kB ± 0% 4.48kB ± 0% ~ (p=0.056 n=5+5) _jsonBody-2 10.2kB ± 0% 10.2kB ± 0% ~ (p=0.365 n=5+5) _jsonBodyValidation-2 19.0kB ± 0% 19.0kB ± 0% +0.04% (p=0.048 n=5+5) _outputHeaders-2 10.4kB ± 0% 10.4kB ± 0% ~ (p=0.619 n=5+5) _requestResponseMapping-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.659 n=5+5) _validation-2 16.5kB ± 0% 16.5kB ± 0% ~ (p=0.056 n=5+5) _noValidation-2 7.81kB ± 0% 7.81kB ± 0% ~ (p=0.460 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 4.63kB ± 0% 4.63kB ± 0% ~ (p=1.000 n=5+4) _ok-2 4.53kB ± 0% 4.53kB ± 0% ~ (p=0.686 n=4+4) _invalidBody-2 8.25kB ± 0% 8.24kB ± 0% ~ (p=0.686 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.6 ± 3% 49.6 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 503 ± 0% 504 ± 0% ~ (p=0.079 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 51.4 ± 3% 51.2 ± 4% ~ (p=1.000 n=5+5) _directGzip_decode-2 506 ± 0% 505 ± 0% ~ (p=0.167 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) ```