swaggest / rest

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

Update deps, add more usage examples #183

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 112 (+1) 8488 (+161) 6118 (+79) 637 (+63) 1733 (+19) 1013 (+2) 206.4K (+4.2K)
Go (test) 54 6371 (+26) 4877 (+15) 295 (+4) 1199 (+7) 188 (+2) 175.5K (+687B)
JSON 3 1856 (+245) 1856 (+245) 0 0 0 71.5K (+7.8K)
github-actions[bot] commented 1 year ago

Go API Changes

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

Unit Test Coverage

total: (statements) 81.1%

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

Codecov Report

Merging #183 (ed921a1) into master (8d8c0d6) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #183   +/-   ##
=======================================
  Coverage   76.09%   76.09%           
=======================================
  Files          30       30           
  Lines        1690     1690           
=======================================
  Hits         1286     1286           
  Misses        293      293           
  Partials      111      111           
Flag Coverage Δ
unittests 76.09% <ø> (ø)

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

: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.33µs ± 1% 1.38µs ± 7% ~ (p=0.052 n=5+6) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 662ns ± 0% 667ns ± 1% +0.83% (p=0.024 n=5+5) DecoderFunc_Decode-2 2.16µs ± 2% 2.16µs ± 2% ~ (p=0.699 n=6+6) Decoder_Decode_json-2 22.4µs ± 1% 22.7µs ± 1% +1.47% (p=0.004 n=6+6) Decoder_Decode_queryObject-2 5.31µs ± 0% 5.31µs ± 0% ~ (p=0.078 n=5+6) Decoder_Decode_jsonParam-2 2.06µs ± 0% 2.06µs ± 1% ~ (p=0.511 n=5+6) DecoderFactory_SetDecoderFunc-2 1.90µs ± 1% 1.90µs ± 0% ~ (p=0.288 n=6+6) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 14.8µs ± 0% 14.8µs ± 0% ~ (p=0.662 n=5+6) Middleware_control-2 3.15µs ± 1% 3.18µs ± 2% ~ (p=0.195 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 ± 3% 1.16kB ± 4% ~ (p=0.706 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.38µs ± 7% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 667ns ± 1% DecoderFunc_Decode-2 2.16µs ± 2% Decoder_Decode_json-2 22.7µs ± 1% Decoder_Decode_queryObject-2 5.31µs ± 0% Decoder_Decode_jsonParam-2 2.06µs ± 1% DecoderFactory_SetDecoderFunc-2 1.90µs ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 14.8µs ± 0% Middleware_control-2 3.18µs ± 2% 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 51.3µs ±39% 53.1µs ±47% ~ (p=0.690 n=5+5) _directGzipHead-2 40.7µs ± 6% 40.9µs ± 5% ~ (p=1.000 n=5+5) _noDirectGzip-2 181µs ± 3% 177µs ± 2% ~ (p=0.421 n=5+5) _directGzip_decode-2 639µs ± 6% 596µs ± 3% -6.69% (p=0.008 n=5+5) _noDirectGzip_decode-2 184µs ± 2% 178µs ± 7% ~ (p=0.151 n=5+5) _jsonBody-2 76.9µs ± 3% 76.2µs ± 3% ~ (p=0.421 n=5+5) _jsonBodyValidation-2 89.4µs ± 4% 85.7µs ± 5% ~ (p=0.056 n=5+5) _outputHeaders-2 41.5µs ± 5% 40.3µs ± 3% ~ (p=0.222 n=5+5) _requestResponseMapping-2 77.8µs ± 2% 73.3µs ± 5% -5.74% (p=0.016 n=5+5) _validation-2 81.7µs ± 1% 76.2µs ± 5% -6.71% (p=0.008 n=5+5) _noValidation-2 60.5µs ± 2% 57.2µs ± 3% -5.50% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 42.6µs ± 3% 42.7µs ±18% ~ (p=0.548 n=5+5) _directGzipHead-2 42.6µs ± 6% 42.0µs ± 5% ~ (p=0.690 n=5+5) _noDirectGzip-2 181µs ± 2% 175µs ± 2% -3.31% (p=0.016 n=5+5) _directGzip_decode-2 610µs ± 1% 583µs ± 1% -4.44% (p=0.008 n=5+5) _noDirectGzip_decode-2 181µs ± 2% 176µs ± 2% -2.60% (p=0.032 n=5+5) _htmlResponse-2 67.5µs ± 3% 67.9µs ± 4% ~ (p=0.841 n=5+5) _jsonBodyManual-2 52.4µs ± 3% 51.3µs ± 4% ~ (p=0.310 n=5+5) _jsonBody-2 72.9µs ± 2% 70.3µs ± 4% -3.46% (p=0.008 n=5+5) _jsonBodyValidation-2 91.6µs ± 2% 87.2µs ± 4% -4.85% (p=0.008 n=5+5) _outputHeaders-2 70.2µs ± 4% 65.6µs ± 4% -6.44% (p=0.016 n=5+5) _requestResponseMapping-2 78.8µs ± 4% 74.9µs ± 3% -4.93% (p=0.008 n=5+5) _validation-2 85.5µs ± 2% 80.3µs ± 3% -6.10% (p=0.008 n=5+5) _noValidation-2 64.4µs ± 4% 62.6µs ± 4% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 46.3µs ±15% 46.3µs ±14% ~ (p=1.000 n=5+5) _ok-2 45.3µs ± 4% 45.4µs ± 4% ~ (p=0.841 n=5+5) _invalidBody-2 66.3µs ± 7% 65.9µs ± 5% ~ (p=1.000 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.23 ±24% 2.32 ±32% ~ (p=0.690 n=5+5) _directGzipHead-2 1.94 ± 3% 1.87 ± 5% -3.73% (p=0.016 n=5+5) _noDirectGzip-2 8.50 ± 9% 8.24 ± 5% ~ (p=0.310 n=5+5) _directGzip_decode-2 23.6 ± 7% 23.1 ± 8% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 8.64 ± 4% 8.19 ± 5% ~ (p=0.056 n=5+5) _jsonBody-2 3.60 ± 7% 3.52 ± 5% ~ (p=0.151 n=5+5) _jsonBodyValidation-2 4.15 ± 6% 4.01 ± 5% ~ (p=0.151 n=5+5) _outputHeaders-2 1.96 ± 7% 1.97 ± 5% ~ (p=1.000 n=5+5) _requestResponseMapping-2 3.53 ± 3% 3.24 ± 5% -8.06% (p=0.008 n=5+5) _validation-2 3.72 ± 4% 3.47 ± 6% -6.56% (p=0.016 n=5+5) _noValidation-2 2.77 ± 5% 2.60 ± 4% -6.30% (p=0.032 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 2.08 ± 4% 2.01 ±10% ~ (p=0.222 n=5+5) _directGzipHead-2 2.04 ±10% 2.05 ± 7% ~ (p=1.000 n=5+5) _noDirectGzip-2 8.29 ± 7% 8.36 ± 4% ~ (p=0.690 n=5+5) _directGzip_decode-2 22.5 ± 5% 22.3 ± 3% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 8.40 ± 3% 8.07 ± 4% ~ (p=0.111 n=5+5) _htmlResponse-2 3.22 ± 5% 3.21 ± 3% ~ (p=1.000 n=5+5) _jsonBodyManual-2 2.51 ± 4% 2.47 ± 4% ~ (p=0.690 n=5+5) _jsonBody-2 3.38 ± 4% 3.18 ± 6% ~ (p=0.095 n=5+5) _jsonBodyValidation-2 4.24 ± 6% 4.05 ± 8% ~ (p=0.310 n=5+5) _outputHeaders-2 3.17 ± 3% 3.03 ± 5% ~ (p=0.056 n=5+5) _requestResponseMapping-2 3.54 ± 8% 3.35 ± 3% ~ (p=0.222 n=5+5) _validation-2 3.87 ± 8% 3.70 ± 5% ~ (p=0.222 n=5+5) _noValidation-2 2.87 ± 3% 2.90 ± 9% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 2.16 ± 9% 2.21 ± 7% ~ (p=0.548 n=5+5) _ok-2 2.16 ±10% 2.22 ± 5% ~ (p=0.222 n=5+5) _invalidBody-2 3.00 ± 9% 3.05 ± 5% ~ (p=1.000 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.07 ±64% 5.08 ±75% ~ (p=1.000 n=5+5) _directGzipHead-2 3.53 ± 7% 3.51 ±10% ~ (p=0.690 n=5+5) _noDirectGzip-2 16.7 ± 5% 16.0 ± 3% ~ (p=0.095 n=5+5) _directGzip_decode-2 53.9 ± 8% 49.8 ± 5% -7.56% (p=0.016 n=5+5) _noDirectGzip_decode-2 16.9 ± 5% 16.1 ±12% ~ (p=0.222 n=5+5) _jsonBody-2 6.68 ± 7% 6.91 ± 5% ~ (p=0.095 n=5+5) _jsonBodyValidation-2 7.83 ± 7% 7.47 ± 7% ~ (p=0.310 n=5+5) _outputHeaders-2 3.46 ± 8% 3.47 ± 4% ~ (p=0.690 n=5+5) _requestResponseMapping-2 6.84 ± 4% 6.57 ± 9% ~ (p=0.421 n=5+5) _validation-2 7.12 ± 4% 6.60 ± 3% -7.20% (p=0.016 n=5+5) _noValidation-2 5.44 ± 4% 4.97 ± 4% -8.50% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 3.57 ± 6% 3.56 ±13% ~ (p=0.841 n=5+5) _directGzipHead-2 3.65 ± 8% 3.54 ± 5% ~ (p=0.421 n=5+5) _noDirectGzip-2 16.6 ± 7% 15.7 ± 4% ~ (p=0.095 n=5+5) _directGzip_decode-2 53.2 ± 4% 48.3 ± 3% -9.20% (p=0.008 n=5+5) _noDirectGzip_decode-2 16.9 ± 6% 16.0 ± 3% ~ (p=0.206 n=5+5) _htmlResponse-2 5.85 ± 5% 5.99 ±10% ~ (p=0.310 n=5+5) _jsonBodyManual-2 4.42 ± 6% 4.32 ± 2% ~ (p=0.286 n=5+5) _jsonBody-2 6.47 ± 6% 6.13 ± 6% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 7.92 ± 4% 7.62 ± 7% ~ (p=0.421 n=5+5) _outputHeaders-2 6.37 ± 3% 5.80 ± 8% -8.95% (p=0.032 n=5+5) _requestResponseMapping-2 6.97 ± 6% 6.47 ± 4% ~ (p=0.095 n=5+5) _validation-2 7.62 ± 6% 6.96 ± 5% -8.63% (p=0.008 n=5+5) _noValidation-2 5.92 ± 9% 5.46 ± 5% -7.72% (p=0.032 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 3.93 ±10% 3.81 ± 4% ~ (p=0.690 n=5+5) _ok-2 3.82 ±10% 3.84 ± 6% ~ (p=0.841 n=5+5) _invalidBody-2 6.12 ± 7% 5.92 ± 6% ~ (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-2 10.5 ±93% 11.0 ±60% ~ (p=0.690 n=5+5) _directGzipHead-2 5.98 ±12% 6.36 ±20% ~ (p=0.548 n=5+5) _noDirectGzip-2 22.8 ± 4% 22.5 ± 8% ~ (p=0.151 n=5+5) _directGzip_decode-2 90.2 ± 8% 80.3 ±13% ~ (p=0.056 n=5+5) _noDirectGzip_decode-2 23.3 ± 7% 22.1 ± 6% ~ (p=0.222 n=5+5) _jsonBody-2 10.2 ± 9% 10.1 ± 6% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 11.9 ±11% 11.2 ±19% ~ (p=0.310 n=5+5) _outputHeaders-2 6.19 ±10% 5.98 ± 9% ~ (p=0.548 n=5+5) _requestResponseMapping-2 10.1 ± 7% 10.2 ±13% ~ (p=1.000 n=5+5) _validation-2 11.0 ±10% 10.2 ±11% ~ (p=0.087 n=5+5) _noValidation-2 8.58 ± 2% 8.33 ± 5% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 6.06 ± 6% 5.43 ±10% -10.44% (p=0.032 n=5+4) _directGzipHead-2 6.33 ±17% 6.14 ±18% ~ (p=0.548 n=5+5) _noDirectGzip-2 22.9 ± 5% 22.1 ± 3% ~ (p=0.095 n=5+5) _directGzip_decode-2 87.0 ±13% 80.1 ± 9% ~ (p=0.310 n=5+5) _noDirectGzip_decode-2 22.8 ± 6% 22.1 ± 4% ~ (p=0.151 n=5+5) _htmlResponse-2 9.19 ± 9% 9.47 ± 5% ~ (p=0.548 n=5+5) _jsonBodyManual-2 7.03 ± 5% 7.12 ± 8% ~ (p=0.841 n=5+5) _jsonBody-2 10.0 ±10% 9.5 ± 8% ~ (p=0.548 n=5+5) _jsonBodyValidation-2 11.9 ± 8% 11.5 ± 8% ~ (p=0.421 n=5+5) _outputHeaders-2 10.0 ±17% 9.2 ±10% ~ (p=0.151 n=5+5) _requestResponseMapping-2 11.0 ±14% 9.7 ± 2% -11.27% (p=0.008 n=5+5) _validation-2 11.4 ± 8% 10.4 ± 5% -8.89% (p=0.016 n=5+5) _noValidation-2 9.46 ±20% 9.09 ± 2% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 7.04 ±59% 5.60 ± 4% ~ (p=0.413 n=5+4) _ok-2 6.12 ±10% 6.12 ±10% ~ (p=0.841 n=5+5) _invalidBody-2 10.5 ±12% 10.4 ±12% ~ (p=1.000 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 14.4 ±79% 15.8 ±72% ~ (p=0.690 n=5+5) _directGzipHead-2 11.8 ±48% 11.5 ±43% ~ (p=1.000 n=5+5) _noDirectGzip-2 28.0 ±14% 27.9 ±15% ~ (p=1.000 n=5+5) _directGzip_decode-2 123 ±11% 100 ±14% -18.66% (p=0.016 n=5+5) _noDirectGzip_decode-2 27.8 ±15% 26.7 ±12% ~ (p=0.690 n=5+5) _jsonBody-2 12.8 ± 6% 14.2 ±24% ~ (p=0.548 n=5+5) _jsonBodyValidation-2 16.1 ±28% 16.9 ±27% ~ (p=1.000 n=5+5) _outputHeaders-2 10.5 ±62% 9.6 ±28% ~ (p=0.841 n=5+5) _requestResponseMapping-2 14.4 ±12% 14.0 ±21% ~ (p=0.841 n=5+5) _validation-2 15.7 ±27% 14.2 ±18% ~ (p=0.841 n=5+5) _noValidation-2 12.5 ±15% 12.9 ±17% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 9.33 ±39% 10.34 ±82% ~ (p=1.000 n=5+5) _directGzipHead-2 9.36 ±25% 10.71 ±54% ~ (p=0.841 n=5+5) _noDirectGzip-2 27.7 ±16% 30.4 ±23% ~ (p=0.841 n=5+5) _directGzip_decode-2 107 ±21% 104 ±16% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 29.5 ±14% 25.4 ± 7% -14.19% (p=0.032 n=5+5) _htmlResponse-2 12.6 ±17% 15.0 ±39% ~ (p=0.421 n=5+5) _jsonBodyManual-2 12.5 ±94% 13.5 ±53% ~ (p=0.310 n=5+5) _jsonBody-2 13.6 ± 1% 14.3 ±34% ~ (p=0.667 n=4+5) _jsonBodyValidation-2 14.9 ±16% 15.3 ±11% ~ (p=0.841 n=5+5) _outputHeaders-2 14.7 ±40% 13.3 ±29% ~ (p=0.548 n=5+5) _requestResponseMapping-2 14.3 ±12% 13.2 ±14% ~ (p=0.310 n=5+5) _validation-2 16.6 ±25% 13.8 ±10% ~ (p=0.222 n=5+5) _noValidation-2 12.9 ±17% 12.8 ±17% ~ (p=0.841 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 10.4 ±46% 8.0 ±10% ~ (p=0.413 n=5+4) _ok-2 9.05 ±10% 10.09 ±33% ~ (p=0.421 n=5+5) _invalidBody-2 15.2 ±23% 14.8 ±19% ~ (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-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.9k ±33% 20.1k ±36% ~ (p=0.690 n=5+5) _directGzipHead-2 24.6k ± 6% 24.5k ± 5% ~ (p=1.000 n=5+5) _noDirectGzip-2 5.54k ± 4% 5.64k ± 2% ~ (p=0.421 n=5+5) _directGzip_decode-2 1.57k ± 6% 1.68k ± 3% +7.10% (p=0.008 n=5+5) _noDirectGzip_decode-2 5.43k ± 2% 5.63k ± 6% ~ (p=0.151 n=5+5) _jsonBody-2 13.0k ± 3% 13.1k ± 3% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 11.2k ± 4% 11.7k ± 6% ~ (p=0.056 n=5+5) _outputHeaders-2 24.1k ± 5% 24.8k ± 3% ~ (p=0.222 n=5+5) _requestResponseMapping-2 12.9k ± 2% 13.6k ± 6% +6.21% (p=0.016 n=5+5) _validation-2 12.2k ± 1% 13.1k ± 5% +7.25% (p=0.008 n=5+5) _noValidation-2 16.5k ± 2% 17.5k ± 3% +5.84% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 23.5k ± 3% 23.6k ±16% ~ (p=0.548 n=5+5) _directGzipHead-2 23.5k ± 7% 23.8k ± 5% ~ (p=0.690 n=5+5) _noDirectGzip-2 5.52k ± 3% 5.71k ± 2% +3.43% (p=0.016 n=5+5) _directGzip_decode-2 1.64k ± 1% 1.72k ± 1% +4.66% (p=0.008 n=5+5) _noDirectGzip_decode-2 5.53k ± 2% 5.67k ± 2% +2.65% (p=0.040 n=5+5) _htmlResponse-2 14.8k ± 3% 14.7k ± 4% ~ (p=0.841 n=5+5) _jsonBodyManual-2 19.1k ± 3% 19.5k ± 4% ~ (p=0.310 n=5+5) _jsonBody-2 13.7k ± 2% 14.2k ± 4% +3.63% (p=0.008 n=5+5) _jsonBodyValidation-2 10.9k ± 2% 11.5k ± 4% +5.14% (p=0.008 n=5+5) _outputHeaders-2 14.3k ± 4% 15.2k ± 4% +6.90% (p=0.016 n=5+5) _requestResponseMapping-2 12.7k ± 3% 13.3k ± 3% +5.18% (p=0.008 n=5+5) _validation-2 11.7k ± 2% 12.5k ± 3% +6.51% (p=0.008 n=5+5) _noValidation-2 15.5k ± 4% 16.0k ± 4% ~ (p=0.278 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 21.7k ±14% 21.7k ±13% ~ (p=1.000 n=5+5) _ok-2 22.1k ± 4% 22.0k ± 4% ~ (p=0.841 n=5+5) _invalidBody-2 15.1k ± 7% 15.2k ± 5% ~ (p=1.000 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=1.000 n=5+5) _directGzipHead-2 3.86kB ± 0% 3.86kB ± 0% ~ (p=0.889 n=5+5) _noDirectGzip-2 7.40kB ±25% 7.14kB ±16% ~ (p=0.841 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.222 n=5+5) _noDirectGzip_decode-2 6.03kB ± 8% 5.78kB ±11% ~ (p=0.690 n=5+5) _jsonBody-2 13.1kB ± 0% 13.1kB ± 0% ~ (p=0.119 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% +0.12% (p=0.008 n=5+5) _requestResponseMapping-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.452 n=5+5) _validation-2 16.5kB ± 0% 16.5kB ± 0% ~ (p=0.349 n=5+5) _noValidation-2 7.77kB ± 0% 7.77kB ± 0% ~ (p=0.214 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-2 3.89kB ± 0% 3.89kB ± 0% ~ (p=0.056 n=5+5) _directGzipHead-2 3.89kB ± 0% 3.89kB ± 0% -0.09% (p=0.040 n=5+5) _noDirectGzip-2 7.44kB ±20% 6.96kB ±16% ~ (p=0.421 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.151 n=5+5) _noDirectGzip_decode-2 6.06kB ± 9% 6.20kB ±12% ~ (p=1.000 n=5+5) _htmlResponse-2 8.08kB ± 0% 8.08kB ± 0% ~ (p=0.413 n=5+5) _jsonBodyManual-2 4.50kB ± 0% 4.50kB ± 0% ~ (p=0.294 n=5+5) _jsonBody-2 10.2kB ± 0% 10.2kB ± 0% ~ (p=0.905 n=5+5) _jsonBodyValidation-2 19.0kB ± 0% 19.0kB ± 0% ~ (p=0.167 n=5+5) _outputHeaders-2 10.4kB ± 0% 10.4kB ± 0% -0.07% (p=0.016 n=5+5) _requestResponseMapping-2 16.7kB ± 0% 16.6kB ± 0% -0.07% (p=0.016 n=5+5) _validation-2 16.6kB ± 0% 16.6kB ± 0% -0.05% (p=0.016 n=5+5) _noValidation-2 7.83kB ± 0% 7.83kB ± 0% ~ (p=0.651 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.571 n=5+5) _ok-2 4.55kB ± 0% 4.55kB ± 0% ~ (p=0.857 n=4+4) _invalidBody-2 8.36kB ± 4% 8.38kB ± 4% ~ (p=0.746 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% 50.2 ± 4% ~ (p=1.000 n=5+5) _directGzip_decode-2 505 ± 0% 504 ± 0% ~ (p=0.365 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% 52.2 ± 4% ~ (p=0.333 n=4+5) _directGzip_decode-2 506 ± 0% 506 ± 0% ~ (p=1.000 n=4+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) ```