swaggest / rest

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

Fix check of required headers #125

Closed vearutop closed 1 year ago

vearutop commented 1 year ago

Fixes #119.

github-actions[bot] commented 1 year ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 105 7310 (+5) 5306 (+4) 488 1516 (+1) 882 (+2) 176.5K (+89B)
Go (test) 47 5141 (+45) 3933 (+34) 185 1023 (+11) 179 143.4K (+1.3K)
Markdown 6 544 415 0 129 0 18.2K (+10B)
github-actions[bot] commented 1 year ago

Go API Changes

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

Unit Test Coverage

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

Coverage of changed lines | File | Function | Coverage | |-----------------------------|-----------|----------| | Total | | 50.0% | | jsonschema/validator.go | | 50.0% | | jsonschema/validator.go:101 | AddSchema | 50.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |--------------------------------------------------|---------------------|---------------|------------------| | Total | | 83.4% | 83.4% (0.0%) | | github.com/swaggest/rest/jsonschema/validator.go | AddSchema | 90.9% | 87.5% (-3.4%) | | github.com/swaggest/rest/request/decoder.go | formDataToURLValues | 66.7% | 77.8% (+11.1%) |
codecov[bot] commented 1 year ago

Codecov Report

Merging #125 (6a500ac) into master (4c2485a) will increase coverage by 0.03%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #125      +/-   ##
==========================================
+ Coverage   77.59%   77.62%   +0.03%     
==========================================
  Files          28       28              
  Lines        1491     1493       +2     
==========================================
+ Hits         1157     1159       +2     
  Misses        217      217              
  Partials      117      117              
Flag Coverage Δ
unittests 77.62% <0.00%> (+0.03%) :arrow_up:

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

Impacted Files Coverage Δ
jsonschema/validator.go 78.21% <0.00%> (-1.59%) :arrow_down:
request/decoder.go 64.81% <0.00%> (+3.70%) :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

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.69µs ± 1% 1.72µs ± 6% ~ (p=0.974 n=5+6) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 879ns ± 1% 904ns ± 2% +2.81% (p=0.004 n=5+6) DecoderFunc_Decode-2 2.49µs ± 1% 2.50µs ± 1% ~ (p=0.485 n=6+6) Decoder_Decode_json-2 29.6µs ± 3% 29.4µs ± 4% ~ (p=0.589 n=6+6) Decoder_Decode_queryObject-2 5.82µs ± 2% 5.77µs ± 1% ~ (p=0.485 n=6+6) Decoder_Decode_jsonParam-2 2.23µs ± 1% 2.24µs ± 1% ~ (p=0.139 n=6+5) DecoderFactory_SetDecoderFunc-2 2.06µs ± 1% 2.05µs ± 1% ~ (p=0.407 n=5+6) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 14.7µs ± 2% 14.5µs ± 2% ~ (p=0.132 n=6+6) Middleware_control-2 4.52µs ± 1% 4.33µs ± 3% -4.18% (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.17kB ± 6% 1.16kB ± 3% ~ (p=0.485 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.72µs ± 6% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 904ns ± 2% DecoderFunc_Decode-2 2.50µs ± 1% Decoder_Decode_json-2 29.4µs ± 4% Decoder_Decode_queryObject-2 5.77µs ± 1% Decoder_Decode_jsonParam-2 2.24µs ± 1% DecoderFactory_SetDecoderFunc-2 2.05µs ± 1% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 14.5µs ± 2% Middleware_control-2 4.33µs ± 3% 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 ± 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 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 22.1µs ± 1% 22.0µs ± 1% ~ (p=0.111 n=4+5) _directGzipHead-2 22.4µs ± 2% 22.2µs ± 6% ~ (p=0.310 n=5+5) _noDirectGzip-2 123µs ± 2% 123µs ± 1% ~ (p=0.841 n=5+5) _directGzip_decode-2 444µs ± 1% 443µs ± 1% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 121µs ± 1% 122µs ± 1% ~ (p=0.095 n=5+5) _jsonBody-2 40.6µs ± 2% 40.2µs ± 1% ~ (p=0.222 n=5+5) _jsonBodyValidation-2 46.1µs ± 3% 46.4µs ± 1% ~ (p=0.310 n=5+5) _outputHeaders-2 21.5µs ± 9% 21.2µs ± 2% ~ (p=1.000 n=5+5) _requestResponseMapping-2 40.2µs ± 1% 40.2µs ± 2% ~ (p=0.841 n=5+5) _validation-2 43.0µs ± 3% 43.1µs ± 2% ~ (p=0.421 n=5+5) _noValidation-2 31.3µs ± 3% 31.4µs ± 1% ~ (p=0.421 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 23.7µs ±14% 22.5µs ± 1% ~ (p=0.310 n=5+5) _directGzipHead-2 22.4µs ± 2% 23.2µs ±14% ~ (p=0.690 n=5+5) _noDirectGzip-2 123µs ± 1% 121µs ± 4% ~ (p=0.151 n=5+5) _directGzip_decode-2 440µs ± 3% 442µs ± 2% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 123µs ± 3% 120µs ± 1% -2.88% (p=0.008 n=5+5) _htmlResponse-2 37.1µs ± 8% 36.2µs ± 2% ~ (p=0.421 n=5+5) _jsonBodyManual-2 25.7µs ± 3% 25.7µs ± 1% ~ (p=1.000 n=5+5) _jsonBody-2 36.7µs ± 1% 37.7µs ± 1% +2.79% (p=0.008 n=5+5) _jsonBodyValidation-2 48.0µs ± 2% 47.8µs ± 1% ~ (p=0.841 n=5+5) _outputHeaders-2 22.0µs ± 3% 21.8µs ± 2% ~ (p=0.222 n=5+5) _requestResponseMapping-2 40.7µs ± 3% 40.3µs ± 2% ~ (p=0.548 n=5+5) _validation-2 43.0µs ± 2% 43.2µs ± 2% ~ (p=0.841 n=5+5) _noValidation-2 31.4µs ± 1% 31.8µs ± 2% ~ (p=0.421 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 25.2µs ± 1% 25.3µs ± 4% ~ (p=0.730 n=4+5) _ok-2 25.3µs ± 1% 25.4µs ± 1% ~ (p=0.222 n=5+5) _invalidBody-2 35.7µs ± 2% 35.9µs ± 1% ~ (p=0.841 n=5+5) name old 50%:ms new 50%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 1.07 ± 5% 1.06 ± 5% ~ (p=0.690 n=5+5) _directGzipHead-2 1.05 ± 8% 1.08 ± 6% ~ (p=0.310 n=5+5) _noDirectGzip-2 5.86 ± 4% 5.92 ± 3% ~ (p=0.421 n=5+5) _directGzip_decode-2 17.4 ± 5% 18.3 ± 6% ~ (p=0.222 n=5+5) _noDirectGzip_decode-2 5.85 ± 6% 5.92 ± 5% ~ (p=0.841 n=5+5) _jsonBody-2 1.82 ± 6% 1.84 ± 3% ~ (p=0.421 n=5+5) _jsonBodyValidation-2 2.09 ± 4% 2.10 ± 2% ~ (p=1.000 n=5+5) _outputHeaders-2 1.03 ±10% 1.03 ± 3% ~ (p=0.841 n=5+5) _requestResponseMapping-2 1.75 ± 6% 1.73 ± 6% ~ (p=0.690 n=5+5) _validation-2 1.91 ± 2% 1.85 ± 4% ~ (p=0.095 n=5+5) _noValidation-2 1.43 ± 5% 1.42 ± 6% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 1.09 ± 6% 1.06 ± 3% ~ (p=0.421 n=5+5) _directGzipHead-2 1.09 ± 7% 1.09 ± 5% ~ (p=1.000 n=5+5) _noDirectGzip-2 5.99 ± 3% 5.86 ± 3% ~ (p=0.222 n=5+5) _directGzip_decode-2 17.6 ± 5% 17.5 ± 7% ~ (p=0.897 n=5+5) _noDirectGzip_decode-2 6.06 ± 7% 5.83 ± 4% ~ (p=0.222 n=5+5) _htmlResponse-2 1.70 ± 7% 1.68 ± 6% ~ (p=0.690 n=5+5) _jsonBodyManual-2 1.23 ± 8% 1.22 ± 5% ~ (p=0.841 n=5+5) _jsonBody-2 1.74 ± 6% 1.66 ± 7% ~ (p=0.222 n=5+5) _jsonBodyValidation-2 2.09 ± 3% 2.11 ± 4% ~ (p=1.000 n=5+5) _outputHeaders-2 1.00 ± 5% 1.03 ± 3% ~ (p=0.222 n=5+5) _requestResponseMapping-2 1.72 ± 3% 1.70 ± 5% ~ (p=0.548 n=5+5) _validation-2 1.92 ± 5% 1.96 ± 6% ~ (p=0.421 n=5+5) _noValidation-2 1.44 ± 6% 1.43 ± 7% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 1.22 ± 2% 1.23 ± 4% ~ (p=0.841 n=5+5) _ok-2 1.22 ± 4% 1.23 ± 4% ~ (p=0.690 n=5+5) _invalidBody-2 1.65 ± 7% 1.61 ± 3% ~ (p=0.548 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.88 ± 7% 1.84 ± 7% ~ (p=0.421 n=5+5) _directGzipHead-2 1.83 ± 3% 1.83 ± 4% ~ (p=1.000 n=5+5) _noDirectGzip-2 10.6 ± 6% 10.7 ± 2% ~ (p=0.421 n=5+5) _directGzip_decode-2 38.3 ± 3% 37.9 ± 6% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 10.6 ± 4% 10.6 ± 3% ~ (p=1.000 n=5+5) _jsonBody-2 3.66 ± 3% 3.60 ± 4% ~ (p=0.151 n=5+5) _jsonBodyValidation-2 4.07 ± 5% 4.25 ± 5% ~ (p=0.056 n=5+5) _outputHeaders-2 1.79 ± 7% 1.80 ± 1% ~ (p=0.841 n=5+5) _requestResponseMapping-2 3.74 ± 7% 3.83 ± 8% ~ (p=0.548 n=5+5) _validation-2 3.99 ± 9% 3.95 ± 5% ~ (p=0.690 n=5+5) _noValidation-2 2.70 ± 6% 2.73 ± 2% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 1.96 ± 8% 1.87 ± 3% ~ (p=0.310 n=5+5) _directGzipHead-2 1.87 ± 4% 1.87 ±10% ~ (p=0.548 n=5+5) _noDirectGzip-2 10.5 ± 5% 10.4 ± 5% ~ (p=0.421 n=5+5) _directGzip_decode-2 37.0 ± 7% 36.8 ± 4% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 10.7 ± 5% 10.5 ± 2% ~ (p=0.381 n=5+5) _htmlResponse-2 3.29 ± 8% 3.17 ± 7% ~ (p=0.421 n=5+5) _jsonBodyManual-2 2.17 ± 4% 2.16 ± 7% ~ (p=1.000 n=5+5) _jsonBody-2 3.28 ± 9% 3.39 ± 6% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 4.41 ± 7% 4.27 ± 5% ~ (p=0.421 n=5+5) _outputHeaders-2 1.84 ± 5% 1.81 ± 3% ~ (p=0.690 n=5+5) _requestResponseMapping-2 3.76 ± 4% 3.76 ± 4% ~ (p=1.000 n=5+5) _validation-2 3.98 ± 5% 3.96 ± 2% ~ (p=0.841 n=5+5) _noValidation-2 2.78 ± 5% 2.75 ± 5% ~ (p=0.643 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 2.19 ± 6% 2.13 ± 5% ~ (p=0.548 n=5+5) _ok-2 2.15 ± 3% 2.16 ± 5% ~ (p=0.841 n=5+5) _invalidBody-2 3.15 ± 4% 3.16 ± 5% ~ (p=1.000 n=5+5) name old 99%:ms new 99%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 3.21 ± 4% 3.20 ±10% ~ (p=0.556 n=4+5) _directGzipHead-2 3.49 ±12% 3.09 ± 1% ~ (p=0.063 n=5+4) _noDirectGzip-2 14.8 ±12% 14.8 ± 3% ~ (p=0.460 n=5+5) _directGzip_decode-2 63.4 ± 8% 62.3 ±14% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 14.3 ± 8% 14.6 ± 4% ~ (p=0.548 n=5+5) _jsonBody-2 5.92 ±10% 5.57 ±13% ~ (p=0.151 n=5+5) _jsonBodyValidation-2 6.37 ±17% 6.34 ± 4% ~ (p=0.841 n=5+5) _outputHeaders-2 3.67 ±25% 3.63 ±43% ~ (p=0.421 n=5+5) _requestResponseMapping-2 7.03 ±10% 7.29 ±24% ~ (p=0.841 n=5+5) _validation-2 7.00 ±15% 7.45 ±18% ~ (p=0.421 n=5+5) _noValidation-2 5.39 ±13% 5.53 ±10% ~ (p=0.421 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 4.82 ±110% 3.26 ± 6% ~ (p=0.310 n=5+5) _directGzipHead-2 3.24 ±11% 3.32 ± 5% ~ (p=0.190 n=5+4) _noDirectGzip-2 15.7 ±10% 14.7 ±24% ~ (p=0.151 n=5+5) _directGzip_decode-2 66.1 ±18% 62.5 ± 8% ~ (p=0.595 n=5+5) _noDirectGzip_decode-2 15.0 ±15% 13.8 ± 4% ~ (p=0.175 n=5+5) _htmlResponse-2 6.30 ±36% 5.59 ±15% ~ (p=0.310 n=5+5) _jsonBodyManual-2 4.29 ±19% 4.09 ±13% ~ (p=0.222 n=5+5) _jsonBody-2 5.78 ±11% 6.52 ± 6% ~ (p=0.056 n=5+5) _jsonBodyValidation-2 7.71 ±12% 7.27 ±13% ~ (p=0.421 n=5+5) _outputHeaders-2 3.98 ±11% 3.68 ± 5% ~ (p=0.381 n=5+5) _requestResponseMapping-2 6.50 ±17% 6.75 ± 8% ~ (p=0.548 n=5+5) _validation-2 6.63 ±18% 6.77 ±13% ~ (p=0.690 n=5+5) _noValidation-2 5.20 ± 3% 5.30 ±14% ~ (p=0.841 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 3.51 ± 6% 3.30 ± 2% -6.03% (p=0.029 n=4+4) _ok-2 3.47 ± 3% 3.40 ± 3% ~ (p=0.222 n=5+5) _invalidBody-2 5.88 ±14% 5.96 ±11% ~ (p=0.841 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 8.37 ±62% 6.06 ±21% ~ (p=0.421 n=5+5) _directGzipHead-2 9.81 ±24% 7.33 ±89% ~ (p=0.151 n=5+5) _noDirectGzip-2 18.8 ±15% 18.6 ±21% ~ (p=0.548 n=5+5) _directGzip_decode-2 84.1 ± 7% 83.4 ±15% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 17.1 ±11% 19.5 ±11% +14.44% (p=0.032 n=5+5) _jsonBody-2 9.95 ±14% 8.09 ±12% -18.71% (p=0.008 n=5+5) _jsonBodyValidation-2 10.1 ±33% 11.0 ±26% ~ (p=0.841 n=5+5) _outputHeaders-2 9.51 ±42% 8.88 ±37% ~ (p=0.690 n=5+5) _requestResponseMapping-2 12.7 ±25% 13.7 ±20% ~ (p=0.421 n=5+5) _validation-2 12.7 ±24% 12.6 ±28% ~ (p=1.000 n=5+5) _noValidation-2 11.7 ±26% 9.9 ±24% ~ (p=0.222 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 10.7 ±82% 6.0 ±27% ~ (p=0.310 n=5+5) _directGzipHead-2 6.31 ±56% 8.60 ±87% ~ (p=0.421 n=5+5) _noDirectGzip-2 23.3 ±40% 21.0 ±37% ~ (p=0.548 n=5+5) _directGzip_decode-2 78.9 ±16% 78.0 ±12% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 21.4 ±48% 18.4 ±18% ~ (p=0.421 n=5+5) _htmlResponse-2 11.0 ±57% 11.6 ±16% ~ (p=0.310 n=5+5) _jsonBodyManual-2 9.26 ±31% 8.75 ±33% ~ (p=0.841 n=5+5) _jsonBody-2 9.39 ±29% 12.85 ±10% +36.86% (p=0.016 n=5+5) _jsonBodyValidation-2 15.1 ±12% 13.1 ±16% ~ (p=0.151 n=5+5) _outputHeaders-2 9.82 ±40% 8.88 ±27% ~ (p=1.000 n=5+5) _requestResponseMapping-2 12.6 ±20% 14.3 ±17% ~ (p=0.222 n=5+5) _validation-2 12.0 ±16% 11.9 ±27% ~ (p=0.690 n=5+5) _noValidation-2 9.92 ±26% 10.30 ±47% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 9.54 ±88% 6.64 ±68% ~ (p=0.310 n=5+5) _ok-2 5.48 ±44% 6.40 ±33% ~ (p=0.222 n=5+5) _invalidBody-2 9.49 ±26% 9.02 ±16% ~ (p=0.841 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 45.1k ± 1% 45.5k ± 1% ~ (p=0.127 n=4+5) _directGzipHead-2 44.7k ± 2% 45.0k ± 6% ~ (p=0.310 n=5+5) _noDirectGzip-2 8.16k ± 2% 8.15k ± 1% ~ (p=0.841 n=5+5) _directGzip_decode-2 2.25k ± 1% 2.26k ± 1% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 8.26k ± 1% 8.20k ± 1% ~ (p=0.095 n=5+5) _jsonBody-2 24.6k ± 2% 24.9k ± 1% ~ (p=0.222 n=5+5) _jsonBodyValidation-2 21.7k ± 3% 21.6k ± 1% ~ (p=0.310 n=5+5) _outputHeaders-2 46.6k ± 9% 47.1k ± 2% ~ (p=1.000 n=5+5) _requestResponseMapping-2 24.9k ± 1% 24.9k ± 2% ~ (p=0.841 n=5+5) _validation-2 23.3k ± 3% 23.2k ± 2% ~ (p=0.421 n=5+5) _noValidation-2 31.9k ± 3% 31.8k ± 1% ~ (p=0.421 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 42.4k ±12% 44.4k ± 1% ~ (p=0.310 n=5+5) _directGzipHead-2 44.7k ± 2% 43.2k ±13% ~ (p=0.690 n=5+5) _noDirectGzip-2 8.15k ± 1% 8.29k ± 3% ~ (p=0.151 n=5+5) _directGzip_decode-2 2.27k ± 3% 2.26k ± 2% ~ (p=0.595 n=5+5) _noDirectGzip_decode-2 8.12k ± 3% 8.36k ± 1% +2.95% (p=0.008 n=5+5) _htmlResponse-2 27.0k ± 7% 27.6k ± 2% ~ (p=0.421 n=5+5) _jsonBodyManual-2 38.9k ± 3% 38.9k ± 1% ~ (p=1.000 n=5+5) _jsonBody-2 27.2k ± 1% 26.5k ± 1% -2.71% (p=0.008 n=5+5) _jsonBodyValidation-2 20.8k ± 2% 20.9k ± 1% ~ (p=0.841 n=5+5) _outputHeaders-2 45.4k ± 3% 45.9k ± 2% ~ (p=0.222 n=5+5) _requestResponseMapping-2 24.6k ± 3% 24.8k ± 2% ~ (p=0.548 n=5+5) _validation-2 23.2k ± 2% 23.1k ± 2% ~ (p=0.841 n=5+5) _noValidation-2 31.8k ± 1% 31.5k ± 2% ~ (p=0.421 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 39.7k ± 1% 39.5k ± 4% ~ (p=0.730 n=4+5) _ok-2 39.5k ± 1% 39.3k ± 1% ~ (p=0.222 n=5+5) _invalidBody-2 28.0k ± 2% 27.9k ± 1% ~ (p=0.841 n=5+5) name old alloc/op new alloc/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 3.94kB ± 0% 3.94kB ± 0% ~ (p=0.730 n=5+5) _directGzipHead-2 3.94kB ± 0% 3.94kB ± 0% ~ (p=0.952 n=5+5) _noDirectGzip-2 6.62kB ±15% 6.55kB ±19% ~ (p=1.000 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 5.61kB ±12% 5.77kB ± 4% ~ (p=0.310 n=5+5) _jsonBody-2 13.2kB ± 0% 13.2kB ± 0% ~ (p=0.071 n=5+5) _jsonBodyValidation-2 19.0kB ± 0% 19.0kB ± 0% ~ (p=0.183 n=5+5) _outputHeaders-2 3.71kB ± 0% 3.71kB ± 0% +0.03% (p=0.016 n=5+4) _requestResponseMapping-2 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.476 n=5+5) _validation-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.175 n=5+5) _noValidation-2 7.89kB ± 0% 7.89kB ± 0% ~ (p=0.365 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 3.99kB ± 0% 3.99kB ± 0% ~ (p=0.238 n=5+5) _directGzipHead-2 3.98kB ± 0% 3.98kB ± 0% ~ (p=0.310 n=5+5) _noDirectGzip-2 6.80kB ±21% 6.75kB ±11% ~ (p=1.000 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 5.76kB ± 4% 5.89kB ± 9% ~ (p=0.841 n=5+5) _htmlResponse-2 8.25kB ± 0% 8.25kB ± 0% ~ (p=0.905 n=5+5) _jsonBodyManual-2 4.65kB ± 0% 4.65kB ± 0% ~ (p=0.357 n=5+5) _jsonBody-2 10.4kB ± 0% 10.4kB ± 0% ~ (p=0.857 n=5+5) _jsonBodyValidation-2 19.1kB ± 0% 19.1kB ± 0% ~ (p=1.000 n=5+5) _outputHeaders-2 3.74kB ± 0% 3.74kB ± 0% ~ (p=1.000 n=5+5) _requestResponseMapping-2 16.8kB ± 0% 16.8kB ± 0% ~ (p=0.667 n=5+5) _validation-2 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.444 n=5+5) _noValidation-2 7.95kB ± 0% 7.95kB ± 0% ~ (p=0.222 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% ~ (p=0.111 n=5+5) _ok-2 4.79kB ± 0% 4.79kB ± 0% ~ (p=0.429 n=4+4) _invalidBody-2 8.63kB ± 0% 8.63kB ± 0% ~ (p=0.600 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.4 ± 3% 49.4 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 502 ± 0% 502 ± 0% ~ (p=0.968 n=4+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.4 ± 3% 51.4 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 505 ± 0% 504 ± 0% ~ (p=0.643 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) ```