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 support for `form` tags #121

Closed vearutop closed 1 year ago

vearutop commented 1 year ago

Fixes #108.

github-actions[bot] commented 1 year ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 105 (+1) 7242 (+49) 5257 (+37) 483 (+1) 1502 (+11) 876 (+6) 174.8K (+1012B)
JSON 3 1462 (+22) 1462 (+22) 0 0 0 59.7K (+1.1K)
Markdown 6 544 (+1) 415 (+1) 0 129 0 18.2K (+50B)
github-actions[bot] commented 1 year ago

Go API Changes

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

Unit Test Coverage

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

Coverage of changed lines | File | Function | Coverage | |------------------------|-------------------|----------| | Total | | 53.3% | | request/decoder.go | | 0.0% | | request/decoder.go:128 | formToURLValues | 0.0% | | request/factory.go | | 100.0% | | request/factory.go:53 | NewDecoderFactory | 100.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |---------------------------------------------|-----------------|---------------|------------------| | Total | | 83.9% | 83.4% (-0.5%) | | github.com/swaggest/rest/request/decoder.go | formToURLValues | no function | 0.0% |
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.86µs ± 4% 1.82µs ± 4% ~ (p=0.222 n=5+5) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 936ns ± 3% 959ns ± 1% +2.38% (p=0.015 n=6+6) DecoderFunc_Decode-2 2.61µs ± 4% 2.70µs ± 4% +3.20% (p=0.037 n=6+6) Decoder_Decode_json-2 31.1µs ± 4% 32.5µs ± 3% +4.47% (p=0.015 n=6+6) Decoder_Decode_queryObject-2 6.13µs ± 2% 6.38µs ± 2% +4.20% (p=0.002 n=6+6) Decoder_Decode_jsonParam-2 2.47µs ± 3% 2.42µs ± 2% ~ (p=0.121 n=6+6) DecoderFactory_SetDecoderFunc-2 2.22µs ± 0% 2.26µs ± 3% ~ (p=0.368 n=6+6) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 14.5µs ± 2% 14.1µs ± 3% -2.59% (p=0.026 n=6+6) Middleware_control-2 5.00µs ±15% 4.76µs ± 1% ~ (p=0.177 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 ± 4% 1.17kB ± 6% ~ (p=0.818 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.82µs ± 4% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 959ns ± 1% DecoderFunc_Decode-2 2.70µs ± 4% Decoder_Decode_json-2 32.5µs ± 3% Decoder_Decode_queryObject-2 6.38µs ± 2% Decoder_Decode_jsonParam-2 2.42µs ± 2% DecoderFactory_SetDecoderFunc-2 2.26µs ± 3% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 14.1µs ± 3% Middleware_control-2 4.76µs ± 1% 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.17kB ± 6% 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% ```
codecov[bot] commented 1 year ago

Codecov Report

Merging #121 (e22e670) into master (a8c2cad) will decrease coverage by 0.52%. The diff coverage is 29.41%.

@@            Coverage Diff             @@
##           master     #121      +/-   ##
==========================================
- Coverage   78.05%   77.54%   -0.52%     
==========================================
  Files          28       28              
  Lines        1472     1483      +11     
==========================================
+ Hits         1149     1150       +1     
- Misses        208      216       +8     
- Partials      115      117       +2     
Flag Coverage Δ
unittests 77.54% <29.41%> (-0.52%) :arrow_down:

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

Impacted Files Coverage Δ
request/decoder.go 61.11% <0.00%> (-9.11%) :arrow_down:
response/encoder.go 64.16% <44.44%> (-1.14%) :arrow_down:
request/factory.go 86.84% <100.00%> (+0.11%) :arrow_up:

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

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 26.3µs ± 2% 28.6µs ±16% ~ (p=0.095 n=5+5) _directGzipHead-2 26.1µs ± 6% 28.1µs ± 4% ~ (p=0.056 n=5+5) _noDirectGzip-2 144µs ± 2% 144µs ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 491µs ± 3% 509µs ± 2% +3.72% (p=0.016 n=5+5) _noDirectGzip_decode-2 137µs ± 2% 145µs ± 4% +5.92% (p=0.008 n=5+5) _jsonBody-2 48.3µs ± 9% 48.9µs ± 4% ~ (p=0.690 n=5+5) _jsonBodyValidation-2 54.0µs ± 4% 56.0µs ± 6% ~ (p=0.222 n=5+5) _outputHeaders-2 24.6µs ± 2% 25.2µs ± 2% +2.74% (p=0.032 n=5+5) _requestResponseMapping-2 47.3µs ± 8% 48.5µs ± 3% ~ (p=0.310 n=5+5) _validation-2 53.1µs ± 2% 54.1µs ±10% ~ (p=0.841 n=5+5) _noValidation-2 38.7µs ± 6% 37.4µs ± 2% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 28.2µs ± 2% 28.0µs ± 3% ~ (p=1.000 n=4+5) _directGzipHead-2 27.3µs ± 3% 30.8µs ±11% +12.95% (p=0.008 n=5+5) _noDirectGzip-2 145µs ± 2% 139µs ± 3% -3.92% (p=0.032 n=5+5) _directGzip_decode-2 525µs ± 2% 481µs ± 3% -8.39% (p=0.008 n=5+5) _noDirectGzip_decode-2 143µs ± 2% 144µs ± 2% ~ (p=0.548 n=5+5) _htmlResponse-2 42.1µs ± 7% 43.3µs ± 5% ~ (p=0.222 n=5+5) _jsonBodyManual-2 30.5µs ± 1% 31.0µs ± 3% ~ (p=0.222 n=5+5) _jsonBody-2 44.4µs ± 4% 46.4µs ± 3% ~ (p=0.056 n=5+5) _jsonBodyValidation-2 57.4µs ± 1% 58.5µs ± 3% ~ (p=0.151 n=5+5) _outputHeaders-2 27.4µs ± 2% 27.3µs ± 3% ~ (p=0.841 n=5+5) _requestResponseMapping-2 51.4µs ± 4% 50.8µs ± 6% ~ (p=0.548 n=5+5) _validation-2 52.0µs ± 3% 52.4µs ± 5% ~ (p=0.310 n=5+5) _noValidation-2 38.4µs ± 5% 39.8µs ± 2% ~ (p=0.222 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 33.3µs ±16% 31.6µs ± 7% ~ (p=0.222 n=5+5) _ok-2 32.4µs ± 4% 30.9µs ± 6% ~ (p=0.056 n=5+5) _invalidBody-2 45.7µs ± 4% 43.5µs ± 6% ~ (p=0.222 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.23 ± 3% 1.32 ± 5% +7.06% (p=0.016 n=5+5) _directGzipHead-2 1.24 ±10% 1.34 ± 4% ~ (p=0.095 n=5+5) _noDirectGzip-2 6.91 ± 4% 7.04 ± 3% ~ (p=0.310 n=5+5) _directGzip_decode-2 19.7 ± 6% 20.2 ± 7% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 6.62 ± 6% 7.07 ± 7% ~ (p=0.056 n=5+5) _jsonBody-2 2.12 ± 2% 2.21 ± 7% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 2.43 ± 6% 2.47 ± 2% ~ (p=0.246 n=5+5) _outputHeaders-2 1.12 ± 9% 1.14 ± 4% ~ (p=0.151 n=5+5) _requestResponseMapping-2 2.01 ± 6% 2.16 ± 9% ~ (p=0.095 n=5+5) _validation-2 2.31 ± 5% 2.32 ± 6% ~ (p=1.000 n=5+5) _noValidation-2 1.77 ± 3% 1.65 ± 3% -6.79% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 1.33 ± 8% 1.35 ± 9% ~ (p=1.000 n=5+5) _directGzipHead-2 1.30 ± 6% 1.39 ± 6% ~ (p=0.056 n=5+5) _noDirectGzip-2 6.94 ± 3% 6.63 ± 5% ~ (p=0.095 n=5+5) _directGzip_decode-2 21.0 ± 7% 18.7 ± 4% -11.01% (p=0.008 n=5+5) _noDirectGzip_decode-2 6.81 ± 5% 6.98 ± 4% ~ (p=0.151 n=5+5) _htmlResponse-2 1.93 ± 8% 2.06 ±11% ~ (p=0.310 n=5+5) _jsonBodyManual-2 1.41 ± 5% 1.41 ±11% ~ (p=0.889 n=5+5) _jsonBody-2 2.02 ± 4% 2.10 ± 5% ~ (p=0.151 n=5+5) _jsonBodyValidation-2 2.54 ± 6% 2.59 ± 6% ~ (p=0.548 n=5+5) _outputHeaders-2 1.24 ± 4% 1.27 ± 6% ~ (p=0.222 n=5+5) _requestResponseMapping-2 2.17 ± 7% 2.18 ± 9% ~ (p=1.000 n=5+5) _validation-2 2.21 ± 4% 2.29 ± 4% ~ (p=0.151 n=5+5) _noValidation-2 1.67 ± 5% 1.75 ± 3% ~ (p=0.063 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 1.54 ± 4% 1.50 ± 6% ~ (p=0.548 n=5+5) _ok-2 1.56 ± 6% 1.52 ±10% ~ (p=0.389 n=5+5) _invalidBody-2 2.00 ± 7% 1.99 ± 9% ~ (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 2.19 ± 8% 2.33 ± 8% ~ (p=0.095 n=5+5) _directGzipHead-2 2.17 ± 8% 2.34 ± 2% ~ (p=0.056 n=5+5) _noDirectGzip-2 12.4 ± 5% 12.2 ± 6% ~ (p=0.222 n=5+5) _directGzip_decode-2 41.9 ± 9% 43.0 ± 8% ~ (p=0.841 n=5+5) _noDirectGzip_decode-2 11.6 ± 2% 12.5 ± 6% +7.65% (p=0.008 n=5+5) _jsonBody-2 4.38 ± 8% 4.50 ± 5% ~ (p=0.421 n=5+5) _jsonBodyValidation-2 4.89 ± 3% 5.14 ± 7% ~ (p=0.286 n=5+5) _outputHeaders-2 2.07 ± 5% 2.04 ± 5% ~ (p=0.587 n=5+5) _requestResponseMapping-2 4.42 ±10% 4.46 ± 4% ~ (p=1.000 n=5+5) _validation-2 4.87 ± 3% 5.06 ±11% ~ (p=0.841 n=5+5) _noValidation-2 3.45 ± 7% 3.24 ± 6% ~ (p=0.095 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 2.40 ±12% 2.35 ± 3% ~ (p=1.000 n=5+5) _directGzipHead-2 2.36 ± 5% 2.52 ±16% ~ (p=0.222 n=5+5) _noDirectGzip-2 12.5 ± 2% 12.1 ± 2% -2.79% (p=0.016 n=5+5) _directGzip_decode-2 44.2 ± 7% 41.1 ± 5% -7.03% (p=0.016 n=5+5) _noDirectGzip_decode-2 12.5 ± 5% 12.2 ± 2% ~ (p=0.214 n=5+5) _htmlResponse-2 3.74 ±10% 3.80 ± 3% ~ (p=0.841 n=5+5) _jsonBodyManual-2 2.60 ± 5% 2.64 ±11% ~ (p=0.841 n=5+5) _jsonBody-2 3.98 ± 8% 4.25 ± 5% ~ (p=0.056 n=5+5) _jsonBodyValidation-2 5.33 ± 4% 5.36 ± 4% ~ (p=1.000 n=5+5) _outputHeaders-2 2.33 ± 4% 2.31 ± 7% ~ (p=1.000 n=5+5) _requestResponseMapping-2 4.77 ± 4% 4.92 ±10% ~ (p=0.548 n=5+5) _validation-2 4.95 ± 5% 4.89 ± 5% ~ (p=0.841 n=5+5) _noValidation-2 3.45 ± 7% 3.47 ± 3% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 2.72 ± 7% 2.69 ± 6% ~ (p=1.000 n=5+5) _ok-2 2.73 ± 4% 2.62 ±10% ~ (p=0.222 n=5+5) _invalidBody-2 4.12 ±10% 3.94 ± 7% ~ (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.77 ±10% 5.20 ±95% ~ (p=0.310 n=5+5) _directGzipHead-2 3.83 ± 8% 4.18 ±14% ~ (p=0.095 n=5+5) _noDirectGzip-2 17.5 ± 7% 17.9 ± 7% ~ (p=0.690 n=5+5) _directGzip_decode-2 73.0 ±13% 69.9 ± 6% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 16.0 ± 5% 18.2 ± 9% +14.24% (p=0.016 n=5+5) _jsonBody-2 7.23 ±27% 7.24 ±13% ~ (p=0.635 n=5+5) _jsonBodyValidation-2 7.50 ±18% 8.67 ±17% ~ (p=0.056 n=5+5) _outputHeaders-2 4.09 ±16% 4.36 ±11% ~ (p=0.103 n=5+5) _requestResponseMapping-2 8.10 ±31% 7.72 ± 9% ~ (p=0.690 n=5+5) _validation-2 7.76 ± 8% 8.50 ±13% ~ (p=0.151 n=5+5) _noValidation-2 6.34 ±26% 5.89 ± 9% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 4.04 ± 3% 4.04 ± 6% ~ (p=1.000 n=4+5) _directGzipHead-2 4.18 ± 7% 5.74 ±54% +37.45% (p=0.032 n=5+5) _noDirectGzip-2 17.7 ± 4% 17.5 ± 4% ~ (p=0.841 n=5+5) _directGzip_decode-2 69.8 ±11% 70.5 ±24% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 17.2 ±13% 18.0 ± 9% ~ (p=0.222 n=5+5) _htmlResponse-2 6.58 ± 8% 6.97 ± 9% ~ (p=0.421 n=5+5) _jsonBodyManual-2 4.83 ± 9% 4.70 ± 7% ~ (p=0.841 n=5+5) _jsonBody-2 6.84 ±12% 6.88 ±12% ~ (p=0.690 n=5+5) _jsonBodyValidation-2 8.37 ± 9% 8.47 ± 6% ~ (p=1.000 n=5+5) _outputHeaders-2 4.61 ± 8% 4.73 ± 7% ~ (p=1.000 n=5+5) _requestResponseMapping-2 8.07 ±14% 8.26 ±26% ~ (p=1.000 n=5+5) _validation-2 7.45 ±11% 7.97 ±12% ~ (p=0.310 n=5+5) _noValidation-2 6.31 ± 9% 6.66 ± 7% ~ (p=0.222 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 4.52 ± 4% 4.22 ± 4% ~ (p=0.057 n=4+4) _ok-2 4.56 ±14% 4.31 ± 8% ~ (p=0.397 n=5+5) _invalidBody-2 8.09 ± 7% 7.15 ±15% -11.55% (p=0.032 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 6.10 ±33% 10.12 ±63% ~ (p=0.095 n=5+5) _directGzipHead-2 9.36 ±66% 7.98 ±27% ~ (p=0.841 n=5+5) _noDirectGzip-2 21.1 ± 4% 21.2 ± 7% ~ (p=1.000 n=5+5) _directGzip_decode-2 97.5 ±14% 95.3 ± 1% ~ (p=0.730 n=5+4) _noDirectGzip_decode-2 20.0 ± 5% 21.3 ± 6% ~ (p=0.056 n=5+5) _jsonBody-2 11.9 ±30% 11.7 ±28% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 13.1 ±33% 14.1 ±16% ~ (p=0.690 n=5+5) _outputHeaders-2 8.36 ±34% 9.19 ±16% ~ (p=0.421 n=5+5) _requestResponseMapping-2 12.8 ±25% 15.5 ±15% ~ (p=0.056 n=5+5) _validation-2 14.3 ±24% 12.7 ±30% ~ (p=0.690 n=5+5) _noValidation-2 10.3 ±38% 10.1 ±60% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 8.95 ±78% 8.13 ±91% ~ (p=0.421 n=5+5) _directGzipHead-2 6.75 ±11% 12.01 ±36% +77.84% (p=0.008 n=5+5) _noDirectGzip-2 22.1 ± 7% 21.6 ± 8% ~ (p=0.095 n=5+5) _directGzip_decode-2 95.3 ±11% 89.6 ±20% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 21.5 ± 8% 23.7 ±17% ~ (p=0.151 n=5+5) _htmlResponse-2 10.5 ±25% 13.5 ±24% ~ (p=0.056 n=5+5) _jsonBodyManual-2 9.50 ±27% 9.46 ±26% ~ (p=1.000 n=5+5) _jsonBody-2 11.1 ±20% 9.6 ±18% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 13.2 ±27% 13.6 ±14% ~ (p=0.690 n=5+5) _outputHeaders-2 8.82 ±33% 9.02 ±19% ~ (p=1.000 n=5+5) _requestResponseMapping-2 14.1 ± 8% 12.4 ±49% ~ (p=0.151 n=5+5) _validation-2 11.7 ±38% 11.6 ±38% ~ (p=0.690 n=5+5) _noValidation-2 11.7 ±21% 12.7 ±31% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 10.0 ±73% 9.4 ±111% ~ (p=0.690 n=5+5) _ok-2 8.53 ±29% 8.80 ±34% ~ (p=0.690 n=5+5) _invalidBody-2 11.1 ±21% 11.5 ±75% ~ (p=0.421 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 639 ± 0% 639 ± 0% ~ (all equal) _directGzipHead-2 183 ± 0% 183 ± 0% ~ (all equal) _noDirectGzip-2 1.04k ± 0% 1.04k ± 0% ~ (all equal) _directGzip_decode-2 639 ± 0% 639 ± 0% ~ (all equal) _noDirectGzip_decode-2 1.04k ± 0% 1.04k ± 0% ~ (all equal) _jsonBody-2 208 ± 0% 208 ± 0% ~ (all equal) _jsonBodyValidation-2 194 ± 0% 194 ± 0% ~ (all equal) _outputHeaders-2 155 ± 0% 155 ± 0% ~ (all equal) _requestResponseMapping-2 94.0 ± 0% 94.0 ± 0% ~ (all equal) _validation-2 177 ± 0% 177 ± 0% ~ (all equal) _noValidation-2 177 ± 0% 177 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 653 ± 0% 653 ± 0% ~ (all equal) _directGzipHead-2 197 ± 0% 197 ± 0% ~ (all equal) _noDirectGzip-2 1.06k ± 0% 1.06k ± 0% ~ (all equal) _directGzip_decode-2 653 ± 0% 653 ± 0% ~ (all equal) _noDirectGzip_decode-2 1.06k ± 0% 1.06k ± 0% ~ (all equal) _htmlResponse-2 370 ± 0% 370 ± 0% ~ (all equal) _jsonBodyManual-2 222 ± 0% 222 ± 0% ~ (all equal) _jsonBody-2 222 ± 0% 222 ± 0% ~ (all equal) _jsonBodyValidation-2 208 ± 0% 208 ± 0% ~ (all equal) _outputHeaders-2 169 ± 0% 169 ± 0% ~ (all equal) _requestResponseMapping-2 108 ± 0% 108 ± 0% ~ (all equal) _validation-2 191 ± 0% 191 ± 0% ~ (all equal) _noValidation-2 191 ± 0% 191 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 337 ± 0% 337 ± 0% ~ (all equal) _ok-2 359 ± 0% 359 ± 0% ~ (all equal) _invalidBody-2 435 ± 0% 435 ± 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 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/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 38.0k ± 2% 35.3k ±15% ~ (p=0.095 n=5+5) _directGzipHead-2 38.3k ± 6% 35.6k ± 4% ~ (p=0.056 n=5+5) _noDirectGzip-2 6.95k ± 2% 6.94k ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 2.04k ± 3% 1.96k ± 2% -3.62% (p=0.016 n=5+5) _noDirectGzip_decode-2 7.32k ± 3% 6.91k ± 4% -5.54% (p=0.008 n=5+5) _jsonBody-2 20.7k ± 8% 20.4k ± 4% ~ (p=0.690 n=5+5) _jsonBodyValidation-2 18.5k ± 4% 17.9k ± 6% ~ (p=0.222 n=5+5) _outputHeaders-2 40.7k ± 2% 39.6k ± 2% -2.68% (p=0.032 n=5+5) _requestResponseMapping-2 21.2k ± 8% 20.6k ± 3% ~ (p=0.333 n=5+5) _validation-2 18.8k ± 2% 18.6k ±10% ~ (p=0.841 n=5+5) _noValidation-2 25.9k ± 6% 26.7k ± 2% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 34.4k ±13% 35.7k ± 3% ~ (p=0.690 n=5+5) _directGzipHead-2 36.6k ± 3% 32.6k ±10% -11.07% (p=0.008 n=5+5) _noDirectGzip-2 6.90k ± 2% 7.19k ± 3% +4.10% (p=0.032 n=5+5) _directGzip_decode-2 1.91k ± 2% 2.08k ± 3% +9.19% (p=0.008 n=5+5) _noDirectGzip_decode-2 7.00k ± 2% 6.93k ± 2% ~ (p=0.548 n=5+5) _htmlResponse-2 23.8k ± 7% 23.1k ± 5% ~ (p=0.222 n=5+5) _jsonBodyManual-2 32.8k ± 1% 32.3k ± 3% ~ (p=0.222 n=5+5) _jsonBody-2 22.5k ± 4% 21.5k ± 3% ~ (p=0.056 n=5+5) _jsonBodyValidation-2 17.4k ± 1% 17.1k ± 3% ~ (p=0.151 n=5+5) _outputHeaders-2 36.5k ± 2% 36.6k ± 4% ~ (p=0.841 n=5+5) _requestResponseMapping-2 19.5k ± 4% 19.7k ± 6% ~ (p=0.548 n=5+5) _validation-2 19.2k ± 3% 19.1k ± 5% ~ (p=0.310 n=5+5) _noValidation-2 26.1k ± 5% 25.1k ± 2% ~ (p=0.222 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 30.2k ±14% 31.7k ± 6% ~ (p=0.222 n=5+5) _ok-2 30.8k ± 4% 32.4k ± 6% ~ (p=0.056 n=5+5) _invalidBody-2 21.9k ± 4% 23.0k ± 6% ~ (p=0.222 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.92kB ± 0% 3.93kB ± 0% ~ (p=0.397 n=4+5) _directGzipHead-2 3.92kB ± 0% 3.93kB ± 0% ~ (p=0.167 n=5+5) _noDirectGzip-2 6.88kB ±20% 7.14kB ±25% ~ (p=0.841 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 5.72kB ± 6% 5.56kB ± 8% ~ (p=0.421 n=5+5) _jsonBody-2 13.2kB ± 0% 13.2kB ± 0% ~ (p=0.333 n=5+5) _jsonBodyValidation-2 19.0kB ± 0% 19.0kB ± 0% ~ (p=0.111 n=5+5) _outputHeaders-2 3.71kB ± 0% 3.71kB ± 0% ~ (p=0.841 n=5+5) _requestResponseMapping-2 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.762 n=5+5) _validation-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.683 n=5+5) _noValidation-2 7.89kB ± 0% 7.89kB ± 0% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 3.98kB ± 0% 3.98kB ± 0% ~ (p=0.897 n=5+5) _directGzipHead-2 3.97kB ± 0% 3.98kB ± 0% ~ (p=0.198 n=5+5) _noDirectGzip-2 7.07kB ±20% 7.39kB ±18% ~ (p=0.690 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.421 n=5+5) _noDirectGzip_decode-2 5.81kB ± 5% 5.81kB ±14% ~ (p=0.690 n=5+5) _htmlResponse-2 8.25kB ± 0% 8.26kB ± 0% ~ (p=0.111 n=5+5) _jsonBodyManual-2 4.65kB ± 0% 4.65kB ± 0% ~ (p=0.770 n=5+5) _jsonBody-2 10.4kB ± 0% 10.4kB ± 0% ~ (p=0.595 n=5+5) _jsonBodyValidation-2 19.1kB ± 0% 19.1kB ± 0% ~ (p=0.175 n=5+5) _outputHeaders-2 3.75kB ± 0% 3.75kB ± 0% ~ (p=0.730 n=5+5) _requestResponseMapping-2 16.8kB ± 0% 16.8kB ± 0% ~ (p=0.540 n=5+5) _validation-2 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.325 n=5+5) _noValidation-2 7.96kB ± 0% 7.96kB ± 0% ~ (p=0.071 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 4.89kB ± 0% 4.89kB ± 0% +0.07% (p=0.008 n=5+5) _ok-2 4.79kB ± 0% 4.80kB ± 0% ~ (p=0.492 n=4+5) _invalidBody-2 8.63kB ± 0% 8.63kB ± 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.8 ± 4% 49.8 ± 4% ~ (p=1.000 n=5+5) _directGzip_decode-2 502 ± 0% 502 ± 0% ~ (p=0.722 n=5+5) _noDirectGzip_decode-2 50.0 ± 0% 50.0 ± 0% ~ (all equal) _jsonBody-2 130 ± 0% 130 ± 0% ~ (all equal) _jsonBodyValidation-2 186 ± 0% 186 ± 0% ~ (all equal) _outputHeaders-2 37.0 ± 0% 37.0 ± 0% ~ (all equal) _requestResponseMapping-2 126 ± 0% 126 ± 0% ~ (all equal) _validation-2 155 ± 0% 155 ± 0% ~ (all equal) _noValidation-2 92.0 ± 0% 92.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.8 ± 3% 51.8 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 505 ± 0% 504 ± 0% ~ (p=0.429 n=5+5) _noDirectGzip_decode-2 52.0 ± 0% 52.0 ± 0% ~ (all equal) _htmlResponse-2 145 ± 0% 145 ± 0% ~ (all equal) _jsonBodyManual-2 51.0 ± 0% 51.0 ± 0% ~ (all equal) _jsonBody-2 102 ± 0% 102 ± 0% ~ (all equal) _jsonBodyValidation-2 188 ± 0% 188 ± 0% ~ (all equal) _outputHeaders-2 38.0 ± 0% 38.0 ± 0% ~ (all equal) _requestResponseMapping-2 128 ± 0% 128 ± 0% ~ (all equal) _validation-2 157 ± 0% 157 ± 0% ~ (all equal) _noValidation-2 94.0 ± 0% 94.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 54.0 ± 0% 54.0 ± 0% ~ (all equal) _ok-2 50.0 ± 0% 50.0 ± 0% ~ (all equal) _invalidBody-2 99.0 ± 0% 99.0 ± 0% ~ (all equal) ```