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

Use canonical header names in validation #144

Closed vearutop closed 1 year ago

vearutop commented 1 year ago

Fixes #141.

github-actions[bot] commented 1 year ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 106 7625 (+16) 5549 (+12) 499 (+1) 1577 (+3) 927 184.5K (+661B)
Go (test) 48 5354 (+85) 4094 (+59) 185 1075 (+26) 182 (+3) 149.5K (+2.3K)
JSON 3 1551 (+34) 1551 (+34) 0 0 0 64.3K (+1.7K)
github-actions[bot] commented 1 year ago

Go API Changes

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

Unit Test Coverage

total: (statements) 83.5% changed lines: (statements) 100.0%

Coverage of changed lines | File | Function | Coverage | |-----------------------------|----------------------|----------| | Total | | 100.0% | | jsonschema/validator.go | | 100.0% | | jsonschema/validator.go:101 | AddSchema | 100.0% | | openapi/collector.go | | 100.0% | | openapi/collector.go:476 | provideHeaderSchemas | 100.0% | | response/encoder.go | | 100.0% | | response/encoder.go:57 | setupHeadersEncoder | 100.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |--------------------------------------------------|----------------------|---------------|------------------| | Total | | 83.4% | 83.5% (+0.1%) | | github.com/swaggest/rest/jsonschema/validator.go | AddSchema | 87.5% | 91.7% (+4.2%) | | github.com/swaggest/rest/openapi/collector.go | provideHeaderSchemas | 66.7% | 68.4% (+1.7%) | | github.com/swaggest/rest/response/encoder.go | setupHeadersEncoder | 76.2% | 80.0% (+3.8%) |
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.34µs ± 0% 1.34µs ± 1% ~ (p=0.965 n=5+6) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 661ns ± 1% 658ns ± 0% ~ (p=0.128 n=6+6) DecoderFunc_Decode-2 1.91µs ± 0% 1.90µs ± 2% ~ (p=1.000 n=5+6) Decoder_Decode_json-2 22.9µs ± 0% 22.8µs ± 0% -0.42% (p=0.030 n=6+5) Decoder_Decode_queryObject-2 5.16µs ± 0% 5.13µs ± 0% -0.56% (p=0.015 n=6+6) Decoder_Decode_jsonParam-2 2.12µs ± 0% 2.12µs ± 1% ~ (p=0.716 n=6+6) DecoderFactory_SetDecoderFunc-2 1.66µs ± 0% 1.67µs ± 0% ~ (p=0.320 n=5+6) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.7µs ± 1% 11.6µs ± 1% ~ (p=0.132 n=6+6) Middleware_control-2 3.20µs ± 1% 3.19µs ± 0% ~ (p=1.000 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.17kB ± 2% 1.17kB ± 3% ~ (p=0.314 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.34µs ± 1% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 658ns ± 0% DecoderFunc_Decode-2 1.90µs ± 2% Decoder_Decode_json-2 22.8µs ± 0% Decoder_Decode_queryObject-2 5.13µs ± 0% Decoder_Decode_jsonParam-2 2.12µs ± 1% DecoderFactory_SetDecoderFunc-2 1.67µs ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.6µs ± 1% Middleware_control-2 3.19µs ± 0% 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 ± 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% ```
codecov[bot] commented 1 year ago

Codecov Report

Merging #144 (c13f679) into master (9e8e48a) will increase coverage by 0.25%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #144      +/-   ##
==========================================
+ Coverage   77.58%   77.84%   +0.25%     
==========================================
  Files          28       28              
  Lines        1584     1593       +9     
==========================================
+ Hits         1229     1240      +11     
+ Misses        233      232       -1     
+ Partials      122      121       -1     
Flag Coverage Δ
unittests 77.84% <100.00%> (+0.25%) :arrow_up:

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

Impacted Files Coverage Δ
jsonschema/validator.go 80.19% <100.00%> (+1.98%) :arrow_up:
openapi/collector.go 64.41% <100.00%> (+0.12%) :arrow_up:
response/encoder.go 66.38% <100.00%> (+1.18%) :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 29.9µs ± 5% 30.5µs ± 1% ~ (p=0.413 n=5+4) _directGzipHead-2 30.4µs ± 5% 28.9µs ± 5% ~ (p=0.056 n=5+5) _noDirectGzip-2 167µs ± 2% 162µs ± 4% ~ (p=0.095 n=5+5) _directGzip_decode-2 594µs ± 3% 607µs ± 3% ~ (p=0.310 n=5+5) _noDirectGzip_decode-2 162µs ± 3% 162µs ± 3% ~ (p=0.690 n=5+5) _jsonBody-2 60.6µs ± 4% 61.0µs ± 5% ~ (p=0.841 n=5+5) _jsonBodyValidation-2 71.2µs ± 1% 71.3µs ± 5% ~ (p=0.690 n=5+5) _outputHeaders-2 31.2µs ± 6% 31.7µs ± 4% ~ (p=0.690 n=5+5) _requestResponseMapping-2 62.6µs ± 2% 62.8µs ± 6% ~ (p=0.548 n=5+5) _validation-2 66.3µs ± 4% 63.0µs ± 2% -4.97% (p=0.008 n=5+5) _noValidation-2 45.4µs ± 2% 45.5µs ± 5% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 32.1µs ±15% 31.1µs ±21% ~ (p=0.310 n=5+5) _directGzipHead-2 29.4µs ± 6% 30.1µs ± 4% ~ (p=0.310 n=5+5) _noDirectGzip-2 156µs ± 4% 154µs ± 6% ~ (p=0.548 n=5+5) _directGzip_decode-2 598µs ± 2% 579µs ± 2% -3.28% (p=0.016 n=5+5) _noDirectGzip_decode-2 159µs ± 6% 153µs ± 0% ~ (p=0.190 n=5+4) _htmlResponse-2 52.3µs ± 4% 50.6µs ± 2% -3.31% (p=0.032 n=5+5) _jsonBodyManual-2 37.8µs ± 6% 34.9µs ± 2% -7.72% (p=0.008 n=5+5) _jsonBody-2 54.5µs ± 5% 52.9µs ± 5% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 69.8µs ± 1% 71.3µs ± 5% ~ (p=0.841 n=5+5) _outputHeaders-2 33.2µs ± 3% 54.5µs ± 3% +64.33% (p=0.008 n=5+5) _requestResponseMapping-2 64.3µs ± 8% 64.6µs ± 3% ~ (p=1.000 n=5+5) _validation-2 69.4µs ± 4% 65.5µs ± 3% -5.75% (p=0.008 n=5+5) _noValidation-2 47.0µs ± 6% 46.5µs ± 3% ~ (p=0.421 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 33.5µs ±13% 32.9µs ± 5% ~ (p=1.000 n=5+5) _ok-2 32.4µs ± 4% 33.1µs ±11% ~ (p=1.000 n=5+5) _invalidBody-2 48.5µs ± 3% 47.4µs ± 3% ~ (p=0.310 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.36 ± 6% 1.40 ± 6% ~ (p=0.310 n=5+5) _directGzipHead-2 1.43 ± 4% 1.33 ± 3% -6.78% (p=0.016 n=5+5) _noDirectGzip-2 7.73 ± 4% 7.69 ± 6% ~ (p=0.841 n=5+5) _directGzip_decode-2 23.4 ± 4% 24.2 ± 8% ~ (p=0.206 n=5+5) _noDirectGzip_decode-2 7.63 ± 7% 7.67 ± 2% ~ (p=0.421 n=5+5) _jsonBody-2 2.72 ± 6% 2.75 ±10% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 3.25 ± 4% 3.30 ± 8% ~ (p=0.421 n=5+5) _outputHeaders-2 1.38 ± 5% 1.50 ± 7% +9.05% (p=0.016 n=5+5) _requestResponseMapping-2 2.86 ± 3% 2.79 ± 4% ~ (p=0.278 n=5+5) _validation-2 2.99 ± 6% 2.87 ± 5% ~ (p=0.222 n=5+5) _noValidation-2 2.01 ± 6% 1.95 ± 4% ~ (p=0.095 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 1.48 ± 5% 1.42 ±15% ~ (p=0.222 n=5+5) _directGzipHead-2 1.36 ± 5% 1.38 ± 7% ~ (p=0.421 n=5+5) _noDirectGzip-2 7.43 ± 3% 7.48 ± 6% ~ (p=0.841 n=5+5) _directGzip_decode-2 23.0 ± 5% 21.8 ± 8% ~ (p=0.095 n=5+5) _noDirectGzip_decode-2 7.64 ± 5% 7.52 ± 5% ~ (p=0.690 n=5+5) _htmlResponse-2 2.31 ± 3% 2.29 ± 4% ~ (p=0.548 n=5+5) _jsonBodyManual-2 1.74 ± 7% 1.70 ± 8% ~ (p=0.548 n=5+5) _jsonBody-2 2.42 ± 5% 2.29 ± 5% ~ (p=0.095 n=5+5) _jsonBodyValidation-2 3.23 ± 7% 3.34 ± 6% ~ (p=0.548 n=5+5) _outputHeaders-2 1.51 ± 7% 2.39 ± 6% +58.54% (p=0.008 n=5+5) _requestResponseMapping-2 2.84 ± 5% 2.73 ± 5% ~ (p=0.095 n=5+5) _validation-2 2.92 ± 3% 2.80 ± 1% -4.19% (p=0.008 n=5+5) _noValidation-2 2.02 ± 8% 2.09 ± 4% ~ (p=0.222 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 1.54 ± 8% 1.56 ± 8% ~ (p=0.690 n=5+5) _ok-2 1.51 ± 6% 1.57 ± 3% ~ (p=0.079 n=5+5) _invalidBody-2 2.01 ± 9% 2.00 ± 4% ~ (p=0.841 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.55 ± 7% 2.68 ±11% ~ (p=0.222 n=5+5) _directGzipHead-2 2.57 ± 8% 2.47 ± 6% ~ (p=0.421 n=5+5) _noDirectGzip-2 14.5 ± 6% 14.1 ± 4% ~ (p=0.151 n=5+5) _directGzip_decode-2 49.1 ± 7% 51.0 ±11% ~ (p=0.421 n=5+5) _noDirectGzip_decode-2 13.8 ± 7% 14.1 ± 6% ~ (p=0.548 n=5+5) _jsonBody-2 5.43 ± 6% 5.55 ± 8% ~ (p=0.690 n=5+5) _jsonBodyValidation-2 6.02 ± 2% 6.23 ±10% ~ (p=0.151 n=5+5) _outputHeaders-2 2.71 ± 8% 2.69 ± 4% ~ (p=0.286 n=5+5) _requestResponseMapping-2 5.41 ± 3% 5.63 ± 7% ~ (p=0.095 n=5+5) _validation-2 6.00 ± 5% 5.73 ± 2% -4.57% (p=0.032 n=5+5) _noValidation-2 4.37 ± 6% 4.33 ± 7% ~ (p=0.841 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 2.70 ±14% 2.65 ±13% ~ (p=0.841 n=5+5) _directGzipHead-2 2.47 ± 1% 2.60 ± 7% ~ (p=0.730 n=4+5) _noDirectGzip-2 13.5 ± 6% 12.9 ± 4% ~ (p=0.151 n=5+5) _directGzip_decode-2 51.1 ± 7% 48.5 ± 5% ~ (p=0.056 n=5+5) _noDirectGzip_decode-2 13.8 ± 1% 13.0 ± 1% -6.16% (p=0.029 n=4+4) _htmlResponse-2 4.80 ± 4% 4.66 ± 8% ~ (p=0.548 n=5+5) _jsonBodyManual-2 3.33 ±10% 2.96 ±12% ~ (p=0.056 n=5+5) _jsonBody-2 5.19 ± 8% 4.86 ± 6% ~ (p=0.095 n=5+5) _jsonBodyValidation-2 6.13 ± 5% 6.25 ± 5% ~ (p=0.548 n=5+5) _outputHeaders-2 2.91 ± 6% 5.16 ± 4% +77.69% (p=0.008 n=5+5) _requestResponseMapping-2 5.82 ± 4% 5.79 ± 6% ~ (p=0.841 n=5+5) _validation-2 6.58 ± 8% 5.97 ± 4% -9.26% (p=0.032 n=5+5) _noValidation-2 4.52 ± 6% 4.50 ± 7% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 2.91 ± 9% 2.85 ± 4% ~ (p=0.548 n=5+5) _ok-2 2.74 ± 7% 2.80 ± 9% ~ (p=0.548 n=5+5) _invalidBody-2 4.70 ± 5% 4.57 ± 5% ~ (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 4.91 ±44% 4.71 ± 1% ~ (p=0.730 n=5+4) _directGzipHead-2 4.91 ±17% 4.44 ±10% ~ (p=0.222 n=5+5) _noDirectGzip-2 21.9 ± 6% 21.1 ± 3% ~ (p=0.095 n=5+5) _directGzip_decode-2 81.1 ± 7% 85.1 ±14% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 20.9 ± 5% 21.2 ± 2% ~ (p=0.548 n=5+5) _jsonBody-2 9.56 ±14% 8.48 ±17% ~ (p=0.222 n=5+5) _jsonBodyValidation-2 10.2 ± 8% 10.0 ±18% ~ (p=1.000 n=5+5) _outputHeaders-2 5.25 ± 4% 5.32 ± 4% ~ (p=0.690 n=5+5) _requestResponseMapping-2 9.14 ±11% 9.01 ±16% ~ (p=0.841 n=5+5) _validation-2 9.38 ±30% 8.17 ± 9% ~ (p=0.056 n=5+5) _noValidation-2 7.52 ±17% 7.42 ±26% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 4.71 ± 6% 4.31 ± 3% -8.53% (p=0.029 n=4+4) _directGzipHead-2 4.45 ± 7% 4.85 ± 9% +8.98% (p=0.016 n=5+5) _noDirectGzip-2 20.3 ±10% 20.6 ± 6% ~ (p=0.548 n=5+5) _directGzip_decode-2 82.8 ± 4% 79.5 ± 9% ~ (p=0.421 n=5+5) _noDirectGzip_decode-2 20.2 ±10% 20.5 ±17% ~ (p=0.690 n=5+5) _htmlResponse-2 7.54 ± 7% 7.12 ± 6% -5.67% (p=0.048 n=5+5) _jsonBodyManual-2 6.05 ±13% 5.32 ±12% -12.01% (p=0.032 n=5+5) _jsonBody-2 8.01 ± 6% 7.44 ± 6% -7.10% (p=0.032 n=5+5) _jsonBodyValidation-2 9.41 ±19% 9.13 ± 9% ~ (p=0.841 n=5+5) _outputHeaders-2 5.61 ± 6% 8.42 ± 8% +50.15% (p=0.008 n=5+5) _requestResponseMapping-2 9.06 ±13% 9.32 ±13% ~ (p=0.421 n=5+5) _validation-2 11.4 ± 8% 8.7 ±11% -23.63% (p=0.008 n=5+5) _noValidation-2 7.74 ±15% 7.11 ± 2% ~ (p=0.056 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 5.91 ±93% 4.55 ± 9% ~ (p=0.841 n=5+5) _ok-2 4.56 ± 7% 5.34 ±67% ~ (p=1.000 n=5+5) _invalidBody-2 8.45 ±19% 7.94 ±16% ~ (p=0.548 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 9.38 ±46% 13.75 ±46% ~ (p=0.222 n=5+5) _directGzipHead-2 11.4 ±59% 8.6 ±42% ~ (p=0.421 n=5+5) _noDirectGzip-2 27.6 ±21% 27.3 ±30% ~ (p=1.000 n=5+5) _directGzip_decode-2 109 ±13% 109 ±14% ~ (p=0.421 n=5+5) _noDirectGzip_decode-2 22.8 ± 8% 23.3 ± 9% ~ (p=0.690 n=5+5) _jsonBody-2 15.4 ±36% 11.8 ±25% ~ (p=0.151 n=5+5) _jsonBodyValidation-2 16.1 ±16% 15.9 ±22% ~ (p=0.690 n=5+5) _outputHeaders-2 11.0 ±30% 12.6 ±22% ~ (p=0.222 n=5+5) _requestResponseMapping-2 15.0 ±31% 14.0 ±23% ~ (p=0.690 n=5+5) _validation-2 16.8 ±47% 14.4 ±29% ~ (p=0.690 n=5+5) _noValidation-2 12.6 ±51% 10.9 ±26% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 10.7 ±80% 11.1 ±61% ~ (p=0.841 n=5+5) _directGzipHead-2 8.31 ±39% 9.47 ±22% ~ (p=0.460 n=5+5) _noDirectGzip-2 25.1 ±15% 25.7 ±13% ~ (p=1.000 n=5+5) _directGzip_decode-2 115 ± 7% 98 ± 7% -15.05% (p=0.008 n=5+5) _noDirectGzip_decode-2 24.7 ±16% 25.0 ±20% ~ (p=1.000 n=5+5) _htmlResponse-2 11.1 ±35% 11.9 ±53% ~ (p=0.690 n=5+5) _jsonBodyManual-2 9.37 ±12% 10.56 ±56% ~ (p=0.690 n=5+5) _jsonBody-2 11.4 ±15% 12.0 ±23% ~ (p=0.548 n=5+5) _jsonBodyValidation-2 16.5 ±38% 15.1 ±44% ~ (p=0.841 n=5+5) _outputHeaders-2 11.0 ±43% 14.0 ±30% ~ (p=0.198 n=5+5) _requestResponseMapping-2 14.5 ±14% 14.8 ±36% ~ (p=0.881 n=5+5) _validation-2 18.0 ±12% 15.0 ±25% ~ (p=0.222 n=5+5) _noValidation-2 14.1 ±19% 10.1 ±19% -28.63% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 9.46 ±68% 8.33 ±29% ~ (p=1.000 n=5+5) _ok-2 9.21 ±65% 7.95 ±97% ~ (p=0.222 n=5+5) _invalidBody-2 12.3 ±21% 11.8 ±31% ~ (p=0.548 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 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 197 ± 0% 214 ± 0% +8.63% (p=0.008 n=5+5) _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 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% 88.0 ± 0% +14.29% (p=0.008 n=5+5) _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 33.5k ± 6% 32.8k ± 1% ~ (p=0.413 n=5+4) _directGzipHead-2 32.9k ± 5% 34.6k ± 5% ~ (p=0.056 n=5+5) _noDirectGzip-2 6.00k ± 2% 6.16k ± 4% ~ (p=0.087 n=5+5) _directGzip_decode-2 1.68k ± 3% 1.65k ± 3% ~ (p=0.310 n=5+5) _noDirectGzip_decode-2 6.17k ± 3% 6.16k ± 3% ~ (p=0.730 n=5+5) _jsonBody-2 16.5k ± 4% 16.4k ± 6% ~ (p=0.841 n=5+5) _jsonBodyValidation-2 14.0k ± 1% 14.0k ± 5% ~ (p=0.690 n=5+5) _outputHeaders-2 32.1k ± 6% 31.6k ± 4% ~ (p=0.690 n=5+5) _requestResponseMapping-2 16.0k ± 2% 15.9k ± 6% ~ (p=0.548 n=5+5) _validation-2 15.1k ± 4% 15.9k ± 2% +5.21% (p=0.008 n=5+5) _noValidation-2 22.0k ± 2% 22.0k ± 5% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 31.3k ±13% 32.4k ±18% ~ (p=0.310 n=5+5) _directGzipHead-2 34.1k ± 6% 33.2k ± 4% ~ (p=0.310 n=5+5) _noDirectGzip-2 6.41k ± 4% 6.49k ± 6% ~ (p=0.548 n=5+5) _directGzip_decode-2 1.67k ± 2% 1.73k ± 2% +3.39% (p=0.016 n=5+5) _noDirectGzip_decode-2 6.31k ± 6% 6.53k ± 0% ~ (p=0.190 n=5+4) _htmlResponse-2 19.1k ± 4% 19.8k ± 2% +3.40% (p=0.032 n=5+5) _jsonBodyManual-2 26.5k ± 5% 28.7k ± 2% +8.26% (p=0.008 n=5+5) _jsonBody-2 18.4k ± 6% 18.9k ± 5% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 14.3k ± 1% 14.0k ± 5% ~ (p=0.841 n=5+5) _outputHeaders-2 30.2k ± 3% 18.3k ± 3% -39.16% (p=0.008 n=5+5) _requestResponseMapping-2 15.6k ± 8% 15.5k ± 3% ~ (p=1.000 n=5+5) _validation-2 14.4k ± 4% 15.3k ± 3% +6.05% (p=0.008 n=5+5) _noValidation-2 21.3k ± 6% 21.5k ± 3% ~ (p=0.421 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 29.9k ±12% 30.4k ± 5% ~ (p=1.000 n=5+5) _ok-2 30.9k ± 4% 30.4k ±10% ~ (p=1.000 n=5+5) _invalidBody-2 20.6k ± 4% 21.1k ± 3% ~ (p=0.310 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 ± 0% 3.87kB ± 0% ~ (p=1.000 n=5+5) _directGzipHead-2 3.87kB ± 0% 3.87kB ± 0% ~ (p=0.659 n=5+5) _noDirectGzip-2 6.93kB ±18% 7.14kB ±17% ~ (p=0.841 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.222 n=5+5) _noDirectGzip_decode-2 5.71kB ± 4% 6.06kB ± 7% ~ (p=0.151 n=5+5) _jsonBody-2 13.1kB ± 0% 13.1kB ± 0% ~ (p=0.968 n=5+5) _jsonBodyValidation-2 18.9kB ± 0% 18.9kB ± 0% -0.05% (p=0.040 n=5+5) _outputHeaders-2 3.59kB ± 0% 3.59kB ± 0% ~ (p=0.762 n=5+5) _requestResponseMapping-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.246 n=5+5) _validation-2 16.5kB ± 0% 16.5kB ± 0% ~ (p=0.063 n=5+5) _noValidation-2 7.76kB ± 0% 7.76kB ± 0% ~ (p=0.952 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 3.90kB ± 0% 3.90kB ± 0% ~ (p=0.246 n=5+5) _directGzipHead-2 3.90kB ± 0% 3.90kB ± 0% ~ (p=0.706 n=5+5) _noDirectGzip-2 6.84kB ±18% 7.13kB ±17% ~ (p=0.690 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.421 n=5+5) _noDirectGzip_decode-2 6.04kB ± 7% 5.90kB ±16% ~ (p=0.310 n=5+5) _htmlResponse-2 8.05kB ± 0% 8.05kB ± 0% ~ (p=0.087 n=5+5) _jsonBodyManual-2 4.51kB ± 0% 4.50kB ± 0% -0.13% (p=0.008 n=5+5) _jsonBody-2 10.2kB ± 0% 10.2kB ± 0% ~ (p=0.381 n=5+4) _jsonBodyValidation-2 19.0kB ± 0% 19.0kB ± 0% ~ (p=0.881 n=5+5) _outputHeaders-2 4.33kB ± 0% 10.43kB ± 0% +140.56% (p=0.008 n=5+5) _requestResponseMapping-2 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.571 n=5+5) _validation-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=1.000 n=5+5) _noValidation-2 7.82kB ± 0% 7.82kB ± 0% ~ (p=0.159 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 4.64kB ± 0% 4.65kB ± 0% ~ (p=0.333 n=5+5) _ok-2 4.55kB ± 0% 4.55kB ± 0% ~ (p=0.714 n=4+4) _invalidBody-2 8.27kB ± 0% 8.26kB ± 0% ~ (p=0.543 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 50.0 ± 4% 49.8 ± 4% ~ (p=1.000 n=5+5) _directGzip_decode-2 504 ± 0% 504 ± 0% ~ (p=0.532 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 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% 52.0 ± 4% ~ (p=1.000 n=5+5) _directGzip_decode-2 506 ± 0% 507 ± 0% ~ (p=0.119 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 55.0 ± 0% 116.0 ± 0% +110.91% (p=0.008 n=5+5) _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) ```