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

Add OpenAPI 3.1 support #166

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 132 (+22) 9497 (+1328) 6911 (+987) 619 (+60) 1967 (+281) 1081 (+78) 231.9K (+33.8K)
Go (test) 63 (+10) 6974 (+653) 5332 (+486) 323 (+33) 1319 (+134) 223 (+37) 193.4K (+19.3K)
JSON 4 (+1) 2392 (+817) 2392 (+817) 0 0 0 98.2K (+32.4K)
Markdown 7 (+1) 593 (+49) 448 (+34) 0 145 (+15) 0 19.9K (+1.5K)
github-actions[bot] commented 1 year ago

Go API Changes

# github.com/swaggest/rest/nethttp
## compatible changes
APIKeySecurityMiddleware: added
AuthMiddleware: added

# github.com/swaggest/rest/web
## compatible changes
NewService: added

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

Unit Test Coverage

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

Coverage of changed lines | File | Function | Coverage | |----------------------------|------------------------------|----------| | Total | | 78.4% | | gorillamux/collector.go | | 100.0% | | gorillamux/collector.go:96 | collect | 100.0% | | nethttp/openapi.go | | 100.0% | | nethttp/openapi.go:43 | AuthMiddleware | 100.0% | | nethttp/openapi.go:83 | APIKeySecurityMiddleware | 100.0% | | nethttp/openapi.go:94 | HTTPBasicSecurityMiddleware | 100.0% | | nethttp/openapi.go:105 | HTTPBearerSecurityMiddleware | 100.0% | | nethttp/openapi.go:159 | OpenAPIAnnotationsMiddleware | 100.0% | | web/service.go | | 60.0% | | web/service.go:23 | NewService | 100.0% | | web/service.go:179 | Docs | 100.0% | | web/service.go:76 | DefaultService | 0.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |--------------------------------------------------|--------------------------|---------------|------------------| | Total | | 82.4% | 81.4% (-1.0%) | | github.com/swaggest/rest/gorillamux/collector.go | collect | 90.0% | 88.9% (-1.1%) | | github.com/swaggest/rest/nethttp/openapi.go | APIKeySecurityMiddleware | no function | 100.0% | | github.com/swaggest/rest/nethttp/openapi.go | AuthMiddleware | no function | 100.0% | | github.com/swaggest/rest/nethttp/openapi.go | SecurityMiddleware | 100.0% | 0.0% (-100.0%) | | github.com/swaggest/rest/nethttp/options.go | AnnotateOpenAPIOperation | 0.0% | 100.0% (+100.0%) | | github.com/swaggest/rest/nethttp/options.go | AnnotateOperation | 85.7% | 0.0% (-85.7%) | | github.com/swaggest/rest/openapi/collector.go | Collect | 66.7% | 0.0% (-66.7%) | | github.com/swaggest/rest/openapi/collector.go | CollectUseCase | 0.0% | 74.1% (+74.1%) | | github.com/swaggest/rest/web/service.go | DefaultService | 100.0% | 0.0% (-100.0%) | | github.com/swaggest/rest/web/service.go | NewService | no function | 100.0% | | github.com/swaggest/rest/web/service.go | OpenAPISchema | 0.0% | 100.0% (+100.0%) |
codecov[bot] commented 1 year ago

Codecov Report

Merging #166 (bdb4022) into master (0c65a80) will decrease coverage by 1.00%. The diff coverage is 81.25%.

@@            Coverage Diff             @@
##           master     #166      +/-   ##
==========================================
- Coverage   77.62%   76.62%   -1.00%     
==========================================
  Files          30       30              
  Lines        1676     1673       -3     
==========================================
- Hits         1301     1282      -19     
- Misses        268      284      +16     
  Partials      107      107              
Flag Coverage Δ
unittests 76.62% <81.25%> (-1.00%) :arrow_down:

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

Files Changed Coverage Δ
request/factory.go 89.36% <ø> (ø)
web/service.go 84.44% <40.00%> (-11.02%) :arrow_down:
gorillamux/collector.go 77.77% <100.00%> (-0.41%) :arrow_down:
nethttp/openapi.go 67.50% <100.00%> (-13.23%) :arrow_down:

... and 2 files with indirect coverage changes

: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.81µs ± 9% 1.82µs ±10% ~ (p=0.905 n=6+6) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 912ns ± 8% 941ns ± 7% ~ (p=0.132 n=6+6) DecoderFunc_Decode-2 2.60µs ± 3% 2.85µs ± 6% +9.91% (p=0.002 n=6+6) Decoder_Decode_json-2 31.6µs ± 9% 30.7µs ± 4% ~ (p=0.485 n=6+6) Decoder_Decode_queryObject-2 6.17µs ± 3% 6.29µs ± 4% ~ (p=0.180 n=6+6) Decoder_Decode_jsonParam-2 2.29µs ± 3% 2.39µs ± 1% +4.31% (p=0.009 n=6+6) DecoderFactory_SetDecoderFunc-2 2.18µs ± 5% 2.24µs ± 1% ~ (p=0.195 n=6+5) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 14.1µs ± 2% 14.2µs ± 3% ~ (p=0.195 n=6+6) Middleware_control-2 4.70µs ± 3% 4.84µs ± 2% +3.10% (p=0.026 n=6+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.13kB ± 3% 1.14kB ± 3% ~ (p=0.461 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 ±10% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 941ns ± 7% DecoderFunc_Decode-2 2.85µs ± 6% Decoder_Decode_json-2 30.7µs ± 4% Decoder_Decode_queryObject-2 6.29µs ± 4% Decoder_Decode_jsonParam-2 2.39µs ± 1% DecoderFactory_SetDecoderFunc-2 2.24µs ± 1% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 14.2µs ± 3% Middleware_control-2 4.84µ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.14kB ± 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 34.3µs ±45% 24.3µs ± 1% -29.07% (p=0.016 n=5+5) _directGzipHead-2 24.4µs ± 4% 24.9µs ± 1% ~ (p=0.151 n=5+5) _noDirectGzip-2 134µs ± 1% 136µs ± 1% ~ (p=0.056 n=5+5) _directGzip_decode-2 485µs ± 3% 500µs ± 2% +3.14% (p=0.016 n=5+5) _noDirectGzip_decode-2 134µs ± 2% 137µs ± 1% +1.85% (p=0.032 n=5+5) _jsonBody-2 49.7µs ± 4% 51.4µs ± 2% ~ (p=0.095 n=5+5) _jsonBodyValidation-2 59.4µs ± 3% 60.3µs ± 2% ~ (p=0.151 n=5+5) _outputHeaders-2 25.9µs ± 2% 26.3µs ± 2% ~ (p=0.222 n=5+5) _requestResponseMapping-2 51.0µs ± 2% 51.6µs ± 2% ~ (p=0.341 n=5+5) _validation-2 54.3µs ± 1% 54.9µs ± 3% ~ (p=0.421 n=5+5) _noValidation-2 39.5µs ± 3% 38.4µs ± 1% -2.88% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 26.2µs ±14% 24.6µs ± 1% -5.87% (p=0.032 n=5+4) _directGzipHead-2 25.1µs ± 2% 25.2µs ± 3% ~ (p=0.690 n=5+5) _noDirectGzip-2 130µs ± 1% 130µs ± 2% ~ (p=0.548 n=5+5) _directGzip_decode-2 486µs ± 1% 496µs ± 1% +1.97% (p=0.016 n=4+5) _noDirectGzip_decode-2 131µs ± 1% 131µs ± 1% ~ (p=0.841 n=5+5) _htmlResponse-2 43.8µs ± 8% 43.4µs ± 4% ~ (p=0.841 n=5+5) _jsonBodyManual-2 30.9µs ± 1% 31.3µs ± 3% ~ (p=0.310 n=5+5) _jsonBody-2 45.7µs ± 2% 45.6µs ± 2% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 60.9µs ± 3% 59.5µs ± 2% ~ (p=0.151 n=5+5) _outputHeaders-2 43.3µs ± 3% 43.3µs ± 2% ~ (p=1.000 n=5+5) _requestResponseMapping-2 51.4µs ± 1% 51.5µs ± 2% ~ (p=0.841 n=5+5) _validation-2 54.2µs ± 4% 55.2µs ± 7% ~ (p=0.690 n=5+5) _noValidation-2 38.4µs ± 2% 40.2µs ± 1% +4.52% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 27.1µs ± 2% 28.9µs ±15% +6.49% (p=0.016 n=5+5) _ok-2 27.1µs ± 2% 27.7µs ± 3% ~ (p=0.190 n=4+5) _invalidBody-2 40.1µs ± 3% 41.9µs ± 3% +4.65% (p=0.008 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.29 ±29% 1.16 ± 8% ~ (p=0.222 n=5+5) _directGzipHead-2 1.18 ± 5% 1.16 ± 9% ~ (p=0.548 n=5+5) _noDirectGzip-2 6.45 ± 5% 6.50 ± 2% ~ (p=0.841 n=5+5) _directGzip_decode-2 18.7 ± 6% 19.0 ± 4% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 6.51 ± 4% 6.58 ± 3% ~ (p=0.690 n=5+5) _jsonBody-2 2.29 ± 7% 2.33 ± 4% ~ (p=0.841 n=5+5) _jsonBodyValidation-2 2.82 ± 7% 2.83 ± 3% ~ (p=0.690 n=5+5) _outputHeaders-2 1.21 ± 4% 1.19 ± 5% ~ (p=0.841 n=5+5) _requestResponseMapping-2 2.24 ± 6% 2.33 ± 6% ~ (p=0.151 n=5+5) _validation-2 2.47 ± 5% 2.44 ± 7% ~ (p=0.968 n=5+5) _noValidation-2 1.74 ± 8% 1.73 ± 6% ~ (p=0.841 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 1.20 ± 2% 1.17 ± 4% -2.71% (p=0.032 n=5+5) _directGzipHead-2 1.19 ± 7% 1.23 ±10% ~ (p=0.548 n=5+5) _noDirectGzip-2 6.34 ± 2% 6.34 ± 5% ~ (p=1.000 n=5+5) _directGzip_decode-2 19.3 ± 2% 19.2 ± 4% ~ (p=0.460 n=5+5) _noDirectGzip_decode-2 6.30 ± 5% 6.24 ± 5% ~ (p=0.595 n=5+5) _htmlResponse-2 1.94 ± 5% 1.95 ± 5% ~ (p=0.841 n=5+5) _jsonBodyManual-2 1.47 ± 7% 1.45 ± 5% ~ (p=0.690 n=5+5) _jsonBody-2 1.96 ± 5% 1.99 ± 3% ~ (p=0.841 n=5+5) _jsonBodyValidation-2 2.77 ± 5% 2.76 ± 4% ~ (p=0.690 n=5+5) _outputHeaders-2 1.84 ± 4% 1.89 ± 4% ~ (p=0.222 n=5+5) _requestResponseMapping-2 2.19 ± 4% 2.33 ± 4% +6.28% (p=0.032 n=5+5) _validation-2 2.40 ± 5% 2.37 ± 8% ~ (p=0.421 n=5+5) _noValidation-2 1.74 ± 7% 1.75 ± 4% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 1.30 ± 4% 1.34 ± 8% ~ (p=0.500 n=5+5) _ok-2 1.34 ±10% 1.30 ± 3% ~ (p=0.841 n=5+5) _invalidBody-2 1.75 ± 7% 1.79 ± 4% ~ (p=0.421 n=5+5) name old 90%:ms new 90%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 3.55 ±90% 2.01 ± 5% -43.25% (p=0.016 n=5+5) _directGzipHead-2 2.07 ± 8% 2.10 ± 6% ~ (p=1.000 n=5+5) _noDirectGzip-2 11.5 ± 4% 11.8 ± 5% ~ (p=0.222 n=5+5) _directGzip_decode-2 40.6 ± 4% 42.4 ± 5% ~ (p=0.222 n=5+5) _noDirectGzip_decode-2 11.8 ± 5% 11.9 ± 3% ~ (p=0.690 n=5+5) _jsonBody-2 4.49 ± 7% 4.73 ± 7% ~ (p=0.151 n=5+5) _jsonBodyValidation-2 5.19 ± 4% 5.25 ± 4% ~ (p=0.548 n=5+5) _outputHeaders-2 2.13 ± 7% 2.22 ± 5% ~ (p=0.151 n=5+5) _requestResponseMapping-2 4.60 ± 6% 4.60 ± 4% ~ (p=1.000 n=5+5) _validation-2 4.88 ± 2% 5.06 ± 6% ~ (p=0.095 n=5+5) _noValidation-2 3.77 ± 5% 3.63 ± 6% ~ (p=0.222 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 2.17 ± 6% 2.15 ± 7% ~ (p=0.690 n=5+5) _directGzipHead-2 2.19 ± 5% 2.06 ± 4% -6.14% (p=0.016 n=5+5) _noDirectGzip-2 11.2 ± 3% 11.3 ± 4% ~ (p=0.690 n=5+5) _directGzip_decode-2 40.6 ± 7% 40.8 ± 4% ~ (p=0.841 n=5+5) _noDirectGzip_decode-2 11.3 ± 5% 11.2 ± 3% ~ (p=0.841 n=5+5) _htmlResponse-2 3.99 ± 5% 3.95 ± 4% ~ (p=0.690 n=5+5) _jsonBodyManual-2 2.63 ±11% 2.69 ± 8% ~ (p=0.421 n=5+5) _jsonBody-2 4.36 ± 5% 4.28 ± 4% ~ (p=0.548 n=5+5) _jsonBodyValidation-2 5.51 ± 4% 5.29 ± 4% ~ (p=0.151 n=5+5) _outputHeaders-2 4.18 ± 4% 4.20 ±11% ~ (p=0.548 n=5+5) _requestResponseMapping-2 4.74 ± 4% 4.67 ± 4% ~ (p=0.690 n=5+5) _validation-2 4.97 ± 8% 5.02 ± 7% ~ (p=1.000 n=5+5) _noValidation-2 3.63 ± 7% 3.97 ± 4% +9.33% (p=0.016 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 2.34 ± 5% 2.46 ±10% ~ (p=0.421 n=5+5) _ok-2 2.47 ±26% 2.35 ± 5% ~ (p=1.000 n=5+5) _invalidBody-2 3.88 ± 4% 4.05 ± 7% ~ (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 9.05 ±63% 3.36 ± 5% -62.85% (p=0.032 n=5+5) _directGzipHead-2 3.68 ±12% 3.81 ±17% ~ (p=1.000 n=5+5) _noDirectGzip-2 16.3 ± 1% 16.1 ± 4% ~ (p=0.198 n=5+5) _directGzip_decode-2 71.0 ±12% 72.5 ±17% ~ (p=1.000 n=5+5) _noDirectGzip_decode-2 16.0 ± 6% 16.2 ± 6% ~ (p=0.690 n=5+5) _jsonBody-2 6.67 ±14% 7.12 ± 7% ~ (p=0.548 n=5+5) _jsonBodyValidation-2 8.47 ±32% 8.21 ± 9% ~ (p=1.000 n=5+5) _outputHeaders-2 4.31 ±13% 4.35 ± 7% ~ (p=0.841 n=5+5) _requestResponseMapping-2 8.05 ±11% 8.31 ±20% ~ (p=0.548 n=5+5) _validation-2 7.56 ± 9% 9.07 ±14% +19.93% (p=0.016 n=5+5) _noValidation-2 6.63 ±19% 6.01 ±18% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 5.29 ±83% 3.50 ± 2% ~ (p=0.111 n=5+4) _directGzipHead-2 4.07 ±17% 3.99 ±28% ~ (p=0.841 n=5+5) _noDirectGzip-2 15.7 ± 4% 15.2 ± 4% ~ (p=0.222 n=5+5) _directGzip_decode-2 67.8 ±10% 70.7 ±13% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 15.3 ± 4% 15.3 ± 5% ~ (p=0.841 n=5+5) _htmlResponse-2 6.17 ± 5% 6.37 ±10% ~ (p=0.730 n=4+5) _jsonBodyManual-2 4.91 ± 9% 5.10 ±10% ~ (p=0.548 n=5+5) _jsonBody-2 7.08 ±14% 7.04 ± 8% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 8.06 ± 9% 7.84 ±10% ~ (p=0.421 n=5+5) _outputHeaders-2 7.00 ±30% 6.62 ±10% ~ (p=0.841 n=5+5) _requestResponseMapping-2 7.92 ±17% 7.60 ±10% ~ (p=0.690 n=5+5) _validation-2 7.64 ±18% 7.90 ±26% ~ (p=1.000 n=5+5) _noValidation-2 6.32 ±12% 6.82 ±11% ~ (p=0.095 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 3.70 ± 8% 3.90 ± 5% ~ (p=0.111 n=5+4) _ok-2 3.78 ±10% 3.85 ± 9% ~ (p=0.556 n=4+5) _invalidBody-2 6.56 ±14% 7.20 ±23% ~ (p=0.222 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 15.6 ±59% 5.6 ±48% -64.18% (p=0.016 n=5+5) _directGzipHead-2 7.48 ±20% 8.42 ±29% ~ (p=0.421 n=5+5) _noDirectGzip-2 20.1 ± 5% 20.1 ± 6% ~ (p=0.841 n=5+5) _directGzip_decode-2 93.9 ±36% 85.7 ±14% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 21.6 ±32% 19.9 ± 7% ~ (p=0.841 n=5+5) _jsonBody-2 11.9 ±35% 11.9 ±19% ~ (p=0.841 n=5+5) _jsonBodyValidation-2 12.9 ±23% 16.1 ±26% ~ (p=0.056 n=5+5) _outputHeaders-2 10.9 ±30% 9.2 ±11% ~ (p=0.151 n=5+5) _requestResponseMapping-2 14.9 ±19% 15.5 ±26% ~ (p=0.690 n=5+5) _validation-2 13.8 ±20% 16.3 ±34% ~ (p=0.151 n=5+5) _noValidation-2 12.6 ±27% 10.4 ±23% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 10.1 ±83% 7.8 ±72% ~ (p=0.310 n=5+5) _directGzipHead-2 11.1 ±31% 9.5 ±14% ~ (p=0.222 n=5+5) _noDirectGzip-2 20.2 ± 8% 24.9 ±72% ~ (p=0.690 n=5+5) _directGzip_decode-2 85.4 ±12% 91.5 ±18% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 19.3 ±11% 18.6 ±11% ~ (p=0.548 n=5+5) _htmlResponse-2 10.8 ±68% 12.6 ±30% ~ (p=0.310 n=5+5) _jsonBodyManual-2 9.87 ±20% 9.92 ±23% ~ (p=0.841 n=5+5) _jsonBody-2 11.8 ±25% 11.3 ±15% ~ (p=0.690 n=5+5) _jsonBodyValidation-2 13.1 ±25% 13.2 ±14% ~ (p=1.000 n=5+5) _outputHeaders-2 11.8 ±33% 11.3 ±44% ~ (p=0.690 n=5+5) _requestResponseMapping-2 14.7 ±19% 12.7 ±21% ~ (p=0.222 n=5+5) _validation-2 11.5 ±23% 13.3 ±40% ~ (p=0.548 n=5+5) _noValidation-2 10.8 ±37% 12.0 ±26% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 5.41 ±20% 8.60 ±74% ~ (p=0.151 n=5+5) _ok-2 6.22 ±14% 7.92 ±43% ~ (p=0.190 n=4+5) _invalidBody-2 12.1 ±57% 11.2 ±61% ~ (p=0.690 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 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% ~ (p=0.333 n=4+5) _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 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 31.7k ±37% 41.1k ± 1% +29.76% (p=0.016 n=5+5) _directGzipHead-2 40.9k ± 4% 40.2k ± 1% ~ (p=0.151 n=5+5) _noDirectGzip-2 7.47k ± 1% 7.37k ± 1% ~ (p=0.056 n=5+5) _directGzip_decode-2 2.06k ± 3% 2.00k ± 2% -3.02% (p=0.016 n=5+5) _noDirectGzip_decode-2 7.46k ± 2% 7.33k ± 1% -1.82% (p=0.032 n=5+5) _jsonBody-2 20.1k ± 3% 19.5k ± 2% ~ (p=0.095 n=5+5) _jsonBodyValidation-2 16.8k ± 3% 16.6k ± 2% ~ (p=0.151 n=5+5) _outputHeaders-2 38.6k ± 2% 38.0k ± 3% ~ (p=0.222 n=5+5) _requestResponseMapping-2 19.6k ± 2% 19.4k ± 2% ~ (p=0.421 n=5+5) _validation-2 18.4k ± 1% 18.2k ± 3% ~ (p=0.421 n=5+5) _noValidation-2 25.3k ± 3% 26.0k ± 1% +2.95% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 38.4k ±12% 40.6k ± 1% +5.74% (p=0.048 n=5+4) _directGzipHead-2 39.9k ± 2% 39.7k ± 3% ~ (p=0.690 n=5+5) _noDirectGzip-2 7.70k ± 0% 7.68k ± 2% ~ (p=0.690 n=5+5) _directGzip_decode-2 2.06k ± 1% 2.02k ± 1% -1.93% (p=0.016 n=4+5) _noDirectGzip_decode-2 7.64k ± 1% 7.62k ± 1% ~ (p=0.841 n=5+5) _htmlResponse-2 22.9k ± 7% 23.0k ± 4% ~ (p=0.841 n=5+5) _jsonBodyManual-2 32.3k ± 1% 31.9k ± 3% ~ (p=0.310 n=5+5) _jsonBody-2 21.9k ± 2% 21.9k ± 2% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 16.4k ± 3% 16.8k ± 2% ~ (p=0.151 n=5+5) _outputHeaders-2 23.1k ± 3% 23.1k ± 2% ~ (p=1.000 n=5+5) _requestResponseMapping-2 19.5k ± 1% 19.4k ± 2% ~ (p=0.841 n=5+5) _validation-2 18.4k ± 4% 18.1k ± 7% ~ (p=0.690 n=5+5) _noValidation-2 26.0k ± 2% 24.9k ± 1% -4.33% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 36.9k ± 2% 34.8k ±13% -5.62% (p=0.016 n=5+5) _ok-2 35.2k ±19% 36.2k ± 3% ~ (p=0.548 n=5+5) _invalidBody-2 25.0k ± 4% 23.8k ± 3% -4.43% (p=0.008 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.86kB ± 1% 3.85kB ± 0% ~ (p=0.087 n=5+5) _directGzipHead-2 3.85kB ± 0% 3.85kB ± 0% ~ (p=0.643 n=5+5) _noDirectGzip-2 6.67kB ±19% 6.91kB ±24% ~ (p=1.000 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.841 n=5+5) _noDirectGzip_decode-2 5.68kB ± 4% 5.98kB ± 6% ~ (p=0.151 n=5+5) _jsonBody-2 13.1kB ± 0% 13.1kB ± 0% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 18.9kB ± 0% 18.9kB ± 0% ~ (p=0.722 n=5+5) _outputHeaders-2 3.56kB ± 0% 3.56kB ± 0% ~ (p=0.444 n=5+5) _requestResponseMapping-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.571 n=5+5) _validation-2 16.5kB ± 0% 16.5kB ± 0% ~ (p=0.278 n=5+5) _noValidation-2 7.75kB ± 0% 7.75kB ± 0% ~ (p=0.333 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 3.88kB ± 0% 3.88kB ± 0% ~ (p=0.246 n=5+5) _directGzipHead-2 3.88kB ± 0% 3.88kB ± 0% ~ (p=0.079 n=5+5) _noDirectGzip-2 6.69kB ±13% 6.87kB ±23% ~ (p=0.841 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.151 n=5+5) _noDirectGzip_decode-2 5.97kB ± 5% 5.82kB ± 7% ~ (p=0.310 n=5+5) _htmlResponse-2 8.06kB ± 0% 8.05kB ± 0% ~ (p=0.111 n=5+4) _jsonBodyManual-2 4.48kB ± 0% 4.48kB ± 0% ~ (p=0.667 n=5+5) _jsonBody-2 10.2kB ± 0% 10.2kB ± 0% ~ (p=0.254 n=5+5) _jsonBodyValidation-2 19.0kB ± 0% 19.0kB ± 0% ~ (p=0.937 n=5+5) _outputHeaders-2 10.4kB ± 0% 10.4kB ± 0% ~ (p=0.262 n=5+5) _requestResponseMapping-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.595 n=5+5) _validation-2 16.5kB ± 0% 16.5kB ± 0% ~ (p=0.056 n=5+5) _noValidation-2 7.81kB ± 0% 7.81kB ± 0% ~ (p=0.389 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 4.63kB ± 0% 4.63kB ± 0% ~ (p=0.143 n=5+5) _ok-2 4.54kB ± 0% 4.53kB ± 0% ~ (p=0.571 n=4+4) _invalidBody-2 8.25kB ± 0% 8.25kB ± 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 49.6 ± 3% 49.6 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 504 ± 0% 503 ± 0% ~ (p=0.921 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.6 ± 3% 51.6 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 505 ± 0% 506 ± 0% ~ (p=0.079 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.0 ± 0% 97.0 ± 0% ~ (all equal) ```