swaggest / rest

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

Use Cloudflare allowlist of compressible mime types #211

Closed vearutop closed 1 month ago

github-actions[bot] commented 1 month ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 113 8834 (+52) 6382 (+51) 664 (+1) 1788 1043 (-6) 215.8K (+1.2K)
github-actions[bot] commented 1 month ago

Go API Changes

# summary
Inferred base version: v0.2.67
Suggested version: v0.2.68
github-actions[bot] commented 1 month ago

Unit Test Coverage

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

Coverage of changed lines | File | Function | Coverage | |---------------------------------|-------------|----------| | Total | | 66.7% | | response/gzip/middleware.go | | 66.7% | | response/gzip/middleware.go:155 | writeHeader | 53.8% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |-----------------------------|-------------|---------------|------------------| | Total | | 81.2% | 81.2% (0.0%) | | response/gzip/middleware.go | writeHeader | 94.7% | 90.0% (-4.7%) |
github-actions[bot] commented 1 month 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-4 1.13µs ± 1% 1.13µs ± 1% ~ (p=0.524 n=5+5) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 533ns ± 1% 533ns ± 1% ~ (p=1.000 n=6+5) DecoderFunc_Decode-4 1.58µs ± 2% 1.54µs ± 0% -2.30% (p=0.002 n=6+6) Decoder_Decode_json-4 19.2µs ± 1% 18.8µs ± 1% -1.98% (p=0.002 n=6+6) Decoder_Decode_queryObject-4 4.11µs ± 1% 4.08µs ± 0% -0.61% (p=0.006 n=6+6) Decoder_Decode_jsonParam-4 1.54µs ± 0% 1.55µs ± 1% ~ (p=0.292 n=6+6) DecoderFactory_SetDecoderFunc-4 1.35µs ± 1% 1.34µs ± 1% ~ (p=0.082 n=6+6) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 8.43µs ± 1% 8.48µs ± 1% ~ (p=0.247 n=6+5) Middleware_control-4 2.82µs ± 2% 2.79µs ± 1% ~ (p=0.258 n=6+6) name old alloc/op new alloc/op delta pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-4 2.46kB ± 0% 2.46kB ± 0% ~ (all equal) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 440B ± 0% 440B ± 0% ~ (all equal) DecoderFunc_Decode-4 1.53kB ± 0% 1.53kB ± 0% ~ (all equal) Decoder_Decode_json-4 12.4kB ± 0% 12.4kB ± 0% ~ (all equal) Decoder_Decode_queryObject-4 2.01kB ± 0% 2.01kB ± 0% ~ (all equal) Decoder_Decode_jsonParam-4 736B ± 0% 736B ± 0% ~ (all equal) DecoderFactory_SetDecoderFunc-4 1.02kB ± 0% 1.02kB ± 0% ~ (all equal) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 1.22kB ± 5% 1.22kB ± 6% ~ (p=0.937 n=6+6) Middleware_control-4 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-4 8.00 ± 0% 8.00 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 4.00 ± 0% 4.00 ± 0% ~ (all equal) DecoderFunc_Decode-4 12.0 ± 0% 12.0 ± 0% ~ (all equal) Decoder_Decode_json-4 177 ± 0% 177 ± 0% ~ (all equal) Decoder_Decode_queryObject-4 38.0 ± 0% 38.0 ± 0% ~ (all equal) Decoder_Decode_jsonParam-4 12.0 ± 0% 12.0 ± 0% ~ (all equal) DecoderFactory_SetDecoderFunc-4 16.0 ± 0% 16.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 11.0 ± 0% 11.0 ± 0% ~ (all equal) Middleware_control-4 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-4 1.13µs ± 1% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 533ns ± 1% DecoderFunc_Decode-4 1.54µs ± 0% Decoder_Decode_json-4 18.8µs ± 1% Decoder_Decode_queryObject-4 4.08µs ± 0% Decoder_Decode_jsonParam-4 1.55µs ± 1% DecoderFactory_SetDecoderFunc-4 1.34µs ± 1% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 8.48µs ± 1% Middleware_control-4 2.79µs ± 1% name alloc/op pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-4 2.46kB ± 0% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 440B ± 0% DecoderFunc_Decode-4 1.53kB ± 0% Decoder_Decode_json-4 12.4kB ± 0% Decoder_Decode_queryObject-4 2.01kB ± 0% Decoder_Decode_jsonParam-4 736B ± 0% DecoderFactory_SetDecoderFunc-4 1.02kB ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 1.22kB ± 6% Middleware_control-4 11.2kB ± 0% name allocs/op pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-4 8.00 ± 0% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 4.00 ± 0% DecoderFunc_Decode-4 12.0 ± 0% Decoder_Decode_json-4 177 ± 0% Decoder_Decode_queryObject-4 38.0 ± 0% Decoder_Decode_jsonParam-4 12.0 ± 0% DecoderFactory_SetDecoderFunc-4 16.0 ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 11.0 ± 0% Middleware_control-4 9.00 ± 0% ```
github-actions[bot] commented 1 month 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-4 16.5µs ± 1% 16.4µs ± 1% ~ (p=0.111 n=4+5) _directGzipHead-4 16.3µs ± 0% 16.1µs ± 1% -1.11% (p=0.016 n=5+4) _noDirectGzip-4 104µs ± 1% 104µs ± 1% ~ (p=0.421 n=5+5) _directGzip_decode-4 311µs ± 1% 317µs ± 0% +1.91% (p=0.008 n=5+5) _noDirectGzip_decode-4 105µs ± 2% 104µs ± 1% ~ (p=0.548 n=5+5) _jsonBody-4 35.0µs ± 1% 35.4µs ± 1% ~ (p=0.056 n=5+5) _jsonBodyValidation-4 39.8µs ± 2% 40.1µs ± 1% ~ (p=0.222 n=5+5) _outputHeaders-4 16.7µs ± 1% 16.7µs ± 2% ~ (p=1.000 n=5+5) _requestResponseMapping-4 34.0µs ± 1% 34.5µs ± 2% ~ (p=0.056 n=5+5) _validation-4 36.9µs ± 2% 37.0µs ± 2% ~ (p=1.000 n=5+5) _noValidation-4 26.0µs ± 1% 26.2µs ± 1% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 16.7µs ± 1% 16.8µs ± 1% ~ (p=0.548 n=5+5) _directGzipHead-4 17.1µs ± 4% 16.6µs ± 0% -3.13% (p=0.016 n=5+4) _noDirectGzip-4 105µs ± 1% 105µs ± 1% ~ (p=1.000 n=5+5) _directGzip_decode-4 321µs ± 1% 317µs ± 2% ~ (p=0.151 n=5+5) _noDirectGzip_decode-4 105µs ± 1% 105µs ± 1% ~ (p=0.333 n=5+5) _htmlResponse-4 30.5µs ± 1% 30.3µs ± 0% ~ (p=0.151 n=5+5) _jsonBodyManual-4 21.4µs ± 1% 21.3µs ± 1% ~ (p=0.310 n=5+5) _jsonBody-4 32.3µs ± 2% 32.1µs ± 1% ~ (p=0.310 n=5+5) _jsonBodyValidation-4 40.5µs ± 2% 40.7µs ± 1% ~ (p=0.841 n=5+5) _outputHeaders-4 29.4µs ± 1% 29.5µs ± 1% ~ (p=0.841 n=5+5) _requestResponseMapping-4 34.3µs ± 1% 34.4µs ± 2% ~ (p=0.690 n=5+5) _validation-4 36.9µs ± 1% 37.0µs ± 1% ~ (p=0.310 n=5+5) _noValidation-4 26.3µs ± 1% 26.3µs ± 1% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 19.8µs ± 9% 19.7µs ±10% ~ (p=0.841 n=5+5) _ok-4 19.2µs ± 1% 19.5µs ± 6% ~ (p=0.841 n=5+5) _invalidBody-4 27.4µs ± 5% 27.6µs ± 5% ~ (p=0.690 n=5+5) name old 50%:ms new 50%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 0.75 ± 9% 0.71 ± 6% ~ (p=0.310 n=5+5) _directGzipHead-4 0.71 ± 5% 0.72 ± 7% ~ (p=1.000 n=5+5) _noDirectGzip-4 4.69 ± 3% 4.72 ± 4% ~ (p=0.841 n=5+5) _directGzip_decode-4 10.2 ± 7% 10.2 ± 6% ~ (p=1.000 n=5+5) _noDirectGzip_decode-4 4.76 ± 4% 4.68 ± 4% ~ (p=0.310 n=5+5) _jsonBody-4 1.47 ± 5% 1.48 ± 4% ~ (p=0.310 n=5+5) _jsonBodyValidation-4 1.71 ± 5% 1.67 ± 4% ~ (p=0.548 n=5+5) _outputHeaders-4 0.73 ± 8% 0.75 ± 6% ~ (p=0.690 n=5+5) _requestResponseMapping-4 1.32 ± 7% 1.39 ± 8% ~ (p=0.151 n=5+5) _validation-4 1.50 ± 6% 1.45 ± 7% ~ (p=0.421 n=5+5) _noValidation-4 1.08 ± 6% 1.08 ± 6% ~ (p=0.841 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 0.73 ± 5% 0.73 ± 3% ~ (p=1.000 n=5+5) _directGzipHead-4 0.73 ± 8% 0.73 ± 6% ~ (p=0.841 n=5+5) _noDirectGzip-4 4.80 ± 6% 4.64 ± 3% ~ (p=0.397 n=5+5) _directGzip_decode-4 11.1 ± 2% 10.1 ± 5% -9.12% (p=0.008 n=5+5) _noDirectGzip_decode-4 4.78 ± 5% 4.86 ± 2% ~ (p=0.421 n=5+5) _htmlResponse-4 1.33 ± 4% 1.31 ± 7% ~ (p=0.841 n=5+5) _jsonBodyManual-4 0.93 ± 7% 0.91 ± 9% ~ (p=0.310 n=5+5) _jsonBody-4 1.32 ± 4% 1.30 ± 4% ~ (p=0.587 n=5+5) _jsonBodyValidation-4 1.67 ± 6% 1.63 ± 3% ~ (p=0.310 n=5+5) _outputHeaders-4 1.19 ± 9% 1.18 ± 4% ~ (p=0.968 n=5+5) _requestResponseMapping-4 1.41 ± 6% 1.37 ± 3% ~ (p=0.341 n=5+5) _validation-4 1.54 ±10% 1.50 ± 3% ~ (p=0.690 n=5+5) _noValidation-4 1.10 ± 5% 1.11 ± 4% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 0.86 ± 8% 0.88 ±12% ~ (p=0.690 n=5+5) _ok-4 0.84 ± 6% 0.84 ± 7% ~ (p=1.000 n=5+5) _invalidBody-4 1.11 ± 8% 1.17 ± 4% ~ (p=0.151 n=5+5) name old 90%:ms new 90%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 1.56 ±13% 1.47 ± 3% ~ (p=0.151 n=5+5) _directGzipHead-4 1.46 ± 3% 1.51 ±10% ~ (p=0.690 n=5+5) _noDirectGzip-4 9.77 ± 4% 9.79 ± 3% ~ (p=0.841 n=5+5) _directGzip_decode-4 31.2 ± 4% 31.6 ± 4% ~ (p=0.690 n=5+5) _noDirectGzip_decode-4 10.1 ± 3% 9.9 ± 3% ~ (p=0.222 n=5+5) _jsonBody-4 3.23 ± 2% 3.23 ± 7% ~ (p=0.548 n=5+5) _jsonBodyValidation-4 3.60 ± 7% 3.64 ± 6% ~ (p=0.841 n=5+5) _outputHeaders-4 1.47 ± 2% 1.50 ± 7% ~ (p=0.690 n=5+5) _requestResponseMapping-4 3.06 ± 0% 3.19 ± 3% +4.17% (p=0.016 n=4+5) _validation-4 3.34 ± 5% 3.41 ± 2% ~ (p=0.548 n=5+5) _noValidation-4 2.42 ± 3% 2.43 ± 3% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 1.56 ± 5% 1.52 ± 7% ~ (p=0.333 n=5+5) _directGzipHead-4 1.56 ± 7% 1.50 ± 5% ~ (p=0.222 n=5+5) _noDirectGzip-4 9.91 ± 6% 10.30 ± 2% ~ (p=0.151 n=5+5) _directGzip_decode-4 31.3 ± 9% 32.0 ± 4% ~ (p=0.841 n=5+5) _noDirectGzip_decode-4 9.79 ± 4% 9.85 ± 5% ~ (p=1.000 n=5+5) _htmlResponse-4 2.84 ± 2% 2.74 ± 2% -3.48% (p=0.008 n=5+5) _jsonBodyManual-4 1.93 ± 4% 1.89 ± 3% ~ (p=0.421 n=5+5) _jsonBody-4 3.04 ± 4% 2.97 ± 4% ~ (p=0.310 n=5+5) _jsonBodyValidation-4 3.72 ± 6% 3.74 ± 2% ~ (p=0.389 n=5+5) _outputHeaders-4 2.73 ± 3% 2.82 ± 5% ~ (p=0.222 n=5+5) _requestResponseMapping-4 3.17 ± 4% 3.18 ± 5% ~ (p=0.841 n=5+5) _validation-4 3.33 ± 3% 3.43 ± 4% ~ (p=0.095 n=5+5) _noValidation-4 2.47 ± 4% 2.46 ± 7% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 1.75 ± 6% 1.79 ±15% ~ (p=1.000 n=5+5) _ok-4 1.74 ± 4% 1.80 ± 6% ~ (p=0.222 n=5+5) _invalidBody-4 2.66 ±11% 2.65 ± 7% ~ (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-4 2.38 ± 2% 2.39 ± 4% ~ (p=0.905 n=4+5) _directGzipHead-4 2.42 ± 3% 2.66 ±33% ~ (p=0.548 n=5+5) _noDirectGzip-4 15.3 ± 5% 15.3 ± 4% ~ (p=1.000 n=5+5) _directGzip_decode-4 60.7 ± 7% 60.5 ± 5% ~ (p=0.548 n=5+5) _noDirectGzip_decode-4 15.7 ± 5% 15.6 ± 5% ~ (p=0.500 n=5+5) _jsonBody-4 5.04 ± 3% 5.38 ± 9% ~ (p=0.095 n=5+5) _jsonBodyValidation-4 6.05 ± 7% 6.30 ±10% ~ (p=0.421 n=5+5) _outputHeaders-4 2.59 ± 7% 2.58 ± 6% ~ (p=0.690 n=5+5) _requestResponseMapping-4 5.64 ± 6% 5.87 ± 8% ~ (p=0.310 n=5+5) _validation-4 6.18 ± 4% 6.23 ± 7% ~ (p=0.841 n=5+5) _noValidation-4 4.47 ± 5% 4.39 ± 6% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 2.48 ± 4% 2.46 ± 3% ~ (p=0.421 n=5+5) _directGzipHead-4 2.71 ±13% 2.54 ±13% ~ (p=0.310 n=5+5) _noDirectGzip-4 15.4 ± 6% 15.6 ± 6% ~ (p=0.460 n=5+5) _directGzip_decode-4 60.5 ± 6% 58.6 ±10% ~ (p=0.548 n=5+5) _noDirectGzip_decode-4 15.5 ± 5% 15.3 ± 8% ~ (p=0.690 n=5+5) _htmlResponse-4 4.88 ± 5% 5.01 ± 5% ~ (p=0.310 n=5+5) _jsonBodyManual-4 3.43 ± 6% 3.50 ± 7% ~ (p=0.690 n=5+5) _jsonBody-4 5.39 ± 5% 5.51 ±16% ~ (p=0.841 n=5+5) _jsonBodyValidation-4 6.28 ± 4% 6.58 ±14% ~ (p=0.548 n=5+5) _outputHeaders-4 4.52 ± 7% 4.73 ± 6% ~ (p=0.151 n=5+5) _requestResponseMapping-4 5.10 ± 6% 5.36 ± 5% ~ (p=0.056 n=5+5) _validation-4 5.56 ± 7% 5.35 ± 4% ~ (p=0.222 n=5+5) _noValidation-4 4.27 ± 4% 4.09 ± 6% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 2.93 ±28% 2.97 ±29% ~ (p=1.000 n=5+5) _ok-4 2.82 ± 5% 2.72 ± 2% ~ (p=0.111 n=5+4) _invalidBody-4 4.55 ± 6% 4.72 ± 5% ~ (p=0.310 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-4 5.76 ±100% 4.41 ±13% ~ (p=0.690 n=5+5) _directGzipHead-4 4.45 ±16% 5.69 ±86% ~ (p=0.548 n=5+5) _noDirectGzip-4 21.5 ±21% 20.6 ±14% ~ (p=0.421 n=5+5) _directGzip_decode-4 88.5 ± 6% 88.7 ±11% ~ (p=0.841 n=5+5) _noDirectGzip_decode-4 22.2 ±28% 20.1 ± 8% ~ (p=0.310 n=5+5) _jsonBody-4 7.95 ±21% 8.46 ±16% ~ (p=0.421 n=5+5) _jsonBodyValidation-4 8.89 ± 9% 9.30 ±14% ~ (p=0.421 n=5+5) _outputHeaders-4 5.06 ±16% 5.73 ±27% ~ (p=0.222 n=5+5) _requestResponseMapping-4 9.04 ± 7% 9.25 ± 8% ~ (p=0.421 n=5+5) _validation-4 9.57 ± 6% 10.12 ± 6% ~ (p=0.151 n=5+5) _noValidation-4 7.66 ±15% 8.02 ±13% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 3.95 ±12% 4.09 ± 8% ~ (p=0.421 n=5+5) _directGzipHead-4 5.75 ±35% 5.96 ±46% ~ (p=1.000 n=5+5) _noDirectGzip-4 20.5 ± 9% 21.0 ±13% ~ (p=0.690 n=5+5) _directGzip_decode-4 79.0 ± 5% 78.8 ±11% ~ (p=1.000 n=5+5) _noDirectGzip_decode-4 20.1 ± 7% 20.6 ±12% ~ (p=1.000 n=5+5) _htmlResponse-4 9.32 ±39% 8.83 ±15% ~ (p=1.000 n=5+5) _jsonBodyManual-4 6.71 ±23% 6.92 ± 9% ~ (p=0.690 n=5+5) _jsonBody-4 8.55 ±16% 9.08 ±15% ~ (p=0.690 n=5+5) _jsonBodyValidation-4 9.54 ± 7% 10.26 ±20% ~ (p=0.421 n=5+5) _outputHeaders-4 7.52 ±29% 8.32 ±15% ~ (p=0.222 n=5+5) _requestResponseMapping-4 8.16 ± 8% 8.99 ±14% ~ (p=0.310 n=5+5) _validation-4 9.02 ±24% 8.91 ±12% ~ (p=1.000 n=5+5) _noValidation-4 7.15 ±26% 6.18 ±14% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 5.65 ±39% 6.38 ±74% ~ (p=0.690 n=5+5) _ok-4 5.15 ±19% 5.24 ±70% ~ (p=0.421 n=5+5) _invalidBody-4 6.81 ±10% 6.93 ± 7% ~ (p=1.000 n=5+5) name old B:rcvd/op new B:rcvd/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 630 ± 0% 630 ± 0% ~ (all equal) _directGzipHead-4 174 ± 0% 174 ± 0% ~ (all equal) _noDirectGzip-4 1.03k ± 0% 1.03k ± 0% ~ (all equal) _directGzip_decode-4 630 ± 0% 630 ± 0% ~ (all equal) _noDirectGzip_decode-4 1.03k ± 0% 1.03k ± 0% ~ (all equal) _jsonBody-4 199 ± 0% 199 ± 0% ~ (all equal) _jsonBodyValidation-4 185 ± 0% 185 ± 0% ~ (all equal) _outputHeaders-4 146 ± 0% 146 ± 0% ~ (all equal) _requestResponseMapping-4 94.0 ± 0% 94.0 ± 0% ~ (all equal) _validation-4 168 ± 0% 168 ± 0% ~ (all equal) _noValidation-4 168 ± 0% 168 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 638 ± 0% 638 ± 0% ~ (all equal) _directGzipHead-4 182 ± 0% 182 ± 0% ~ (all equal) _noDirectGzip-4 1.04k ± 0% 1.04k ± 0% ~ (all equal) _directGzip_decode-4 638 ± 0% 638 ± 0% ~ (all equal) _noDirectGzip_decode-4 1.04k ± 0% 1.04k ± 0% ~ (all equal) _htmlResponse-4 355 ± 0% 355 ± 0% ~ (all equal) _jsonBodyManual-4 207 ± 0% 207 ± 0% ~ (all equal) _jsonBody-4 207 ± 0% 207 ± 0% ~ (all equal) _jsonBodyValidation-4 193 ± 0% 193 ± 0% ~ (all equal) _outputHeaders-4 214 ± 0% 214 ± 0% ~ (all equal) _requestResponseMapping-4 108 ± 0% 108 ± 0% ~ (all equal) _validation-4 176 ± 0% 176 ± 0% ~ (all equal) _noValidation-4 176 ± 0% 176 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 322 ± 0% 322 ± 0% ~ (all equal) _ok-4 344 ± 0% 344 ± 0% ~ (all equal) _invalidBody-4 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-4 103 ± 0% 103 ± 0% ~ (all equal) _directGzipHead-4 104 ± 0% 104 ± 0% ~ (all equal) _noDirectGzip-4 117 ± 0% 117 ± 0% ~ (all equal) _directGzip_decode-4 116 ± 0% 116 ± 0% ~ (all equal) _noDirectGzip_decode-4 130 ± 0% 130 ± 0% ~ (all equal) _jsonBody-4 188 ± 0% 188 ± 0% ~ (all equal) _jsonBodyValidation-4 192 ± 0% 192 ± 0% ~ (all equal) _outputHeaders-4 77.0 ± 0% 77.0 ± 0% ~ (all equal) _requestResponseMapping-4 169 ± 0% 169 ± 0% ~ (all equal) _validation-4 170 ± 0% 170 ± 0% ~ (all equal) _noValidation-4 173 ± 0% 173 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 103 ± 0% 103 ± 0% ~ (all equal) _directGzipHead-4 104 ± 0% 104 ± 0% ~ (all equal) _noDirectGzip-4 117 ± 0% 117 ± 0% ~ (all equal) _directGzip_decode-4 116 ± 0% 116 ± 0% ~ (all equal) _noDirectGzip_decode-4 130 ± 0% 130 ± 0% ~ (all equal) _htmlResponse-4 108 ± 0% 108 ± 0% ~ (all equal) _jsonBodyManual-4 195 ± 0% 195 ± 0% ~ (all equal) _jsonBody-4 188 ± 0% 188 ± 0% ~ (all equal) _jsonBodyValidation-4 192 ± 0% 192 ± 0% ~ (all equal) _outputHeaders-4 88.0 ± 0% 88.0 ± 0% ~ (all equal) _requestResponseMapping-4 169 ± 0% 169 ± 0% ~ (all equal) _validation-4 170 ± 0% 170 ± 0% ~ (all equal) _noValidation-4 173 ± 0% 173 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 74.0 ± 0% 74.0 ± 0% ~ (all equal) _ok-4 74.0 ± 0% 74.0 ± 0% ~ (all equal) _invalidBody-4 137 ± 0% 137 ± 0% ~ (all equal) name old rps new rps delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 60.5k ± 1% 61.1k ± 1% ~ (p=0.111 n=4+5) _directGzipHead-4 61.3k ± 0% 62.0k ± 1% +1.12% (p=0.016 n=5+4) _noDirectGzip-4 9.63k ± 1% 9.66k ± 1% ~ (p=0.421 n=5+5) _directGzip_decode-4 3.22k ± 1% 3.16k ± 0% -1.88% (p=0.008 n=5+5) _noDirectGzip_decode-4 9.54k ± 2% 9.59k ± 1% ~ (p=0.548 n=5+5) _jsonBody-4 28.6k ± 1% 28.2k ± 1% ~ (p=0.056 n=5+5) _jsonBodyValidation-4 25.1k ± 2% 24.9k ± 1% ~ (p=0.222 n=5+5) _outputHeaders-4 60.0k ± 1% 59.9k ± 2% ~ (p=1.000 n=5+5) _requestResponseMapping-4 29.4k ± 1% 29.0k ± 2% ~ (p=0.056 n=5+5) _validation-4 27.1k ± 2% 27.0k ± 2% ~ (p=1.000 n=5+5) _noValidation-4 38.5k ± 1% 38.2k ± 1% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 59.8k ± 1% 59.5k ± 1% ~ (p=0.548 n=5+5) _directGzipHead-4 58.4k ± 4% 60.2k ± 0% +3.18% (p=0.016 n=5+4) _noDirectGzip-4 9.55k ± 1% 9.56k ± 1% ~ (p=1.000 n=5+5) _directGzip_decode-4 3.12k ± 1% 3.16k ± 2% ~ (p=0.151 n=5+5) _noDirectGzip_decode-4 9.54k ± 1% 9.50k ± 1% ~ (p=0.333 n=5+5) _htmlResponse-4 32.8k ± 1% 33.0k ± 0% ~ (p=0.151 n=5+5) _jsonBodyManual-4 46.7k ± 1% 46.9k ± 1% ~ (p=0.310 n=5+5) _jsonBody-4 31.0k ± 2% 31.2k ± 1% ~ (p=0.310 n=5+5) _jsonBodyValidation-4 24.7k ± 2% 24.6k ± 1% ~ (p=0.841 n=5+5) _outputHeaders-4 34.0k ± 1% 33.9k ± 1% ~ (p=0.841 n=5+5) _requestResponseMapping-4 29.2k ± 1% 29.1k ± 2% ~ (p=0.690 n=5+5) _validation-4 27.1k ± 1% 27.0k ± 1% ~ (p=0.310 n=5+5) _noValidation-4 38.1k ± 1% 38.1k ± 1% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 50.7k ± 9% 51.0k ±10% ~ (p=0.841 n=5+5) _ok-4 52.1k ± 1% 51.4k ± 6% ~ (p=0.841 n=5+5) _invalidBody-4 36.5k ± 5% 36.3k ± 5% ~ (p=0.690 n=5+5) name old alloc/op new alloc/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 3.99kB ± 0% 3.99kB ± 0% ~ (p=0.302 n=5+5) _directGzipHead-4 3.99kB ± 0% 3.99kB ± 0% ~ (p=0.540 n=5+5) _noDirectGzip-4 7.11kB ±17% 7.65kB ±26% ~ (p=0.548 n=5+5) _directGzip_decode-4 398kB ± 0% 398kB ± 0% ~ (p=0.095 n=5+5) _noDirectGzip_decode-4 6.34kB ±16% 6.52kB ± 7% ~ (p=0.421 n=5+5) _jsonBody-4 13.7kB ± 0% 13.7kB ± 0% ~ (p=0.516 n=5+5) _jsonBodyValidation-4 19.5kB ± 0% 19.5kB ± 0% ~ (p=0.460 n=5+5) _outputHeaders-4 3.71kB ± 0% 3.71kB ± 0% ~ (p=0.595 n=5+5) _requestResponseMapping-4 16.8kB ± 0% 16.8kB ± 0% ~ (p=1.000 n=5+5) _validation-4 16.8kB ± 0% 16.8kB ± 0% ~ (p=0.500 n=5+5) _noValidation-4 7.93kB ± 0% 7.93kB ± 0% ~ (p=0.302 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 4.01kB ± 0% 4.01kB ± 0% ~ (p=0.960 n=5+5) _directGzipHead-4 4.00kB ± 0% 4.00kB ± 0% ~ (p=0.413 n=5+5) _noDirectGzip-4 8.00kB ±14% 7.55kB ±18% ~ (p=0.421 n=5+5) _directGzip_decode-4 398kB ± 0% 398kB ± 0% ~ (p=0.389 n=5+5) _noDirectGzip_decode-4 6.89kB ±14% 7.05kB ±10% ~ (p=0.690 n=5+5) _htmlResponse-4 8.55kB ± 0% 8.55kB ± 0% ~ (p=0.587 n=5+5) _jsonBodyManual-4 4.96kB ± 0% 4.96kB ± 0% ~ (p=0.413 n=5+4) _jsonBody-4 10.7kB ± 0% 10.7kB ± 0% ~ (p=0.167 n=5+5) _jsonBodyValidation-4 19.6kB ± 0% 19.6kB ± 0% ~ (p=0.595 n=5+5) _outputHeaders-4 10.5kB ± 0% 10.5kB ± 0% ~ (p=0.635 n=5+5) _requestResponseMapping-4 16.8kB ± 0% 16.8kB ± 0% ~ (p=0.643 n=5+5) _validation-4 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.333 n=5+5) _noValidation-4 7.96kB ± 0% 7.96kB ± 0% ~ (p=0.246 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 5.23kB ± 0% 5.23kB ± 0% ~ (p=0.706 n=5+5) _ok-4 5.14kB ± 0% 5.13kB ± 0% ~ (p=0.114 n=4+4) _invalidBody-4 8.81kB ± 0% 8.81kB ± 0% ~ (p=0.886 n=4+4) name old allocs/op new allocs/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 42.0 ± 0% 42.0 ± 0% ~ (all equal) _directGzipHead-4 42.0 ± 0% 42.0 ± 0% ~ (all equal) _noDirectGzip-4 49.2 ± 4% 49.2 ± 4% ~ (p=1.000 n=5+5) _directGzip_decode-4 486 ± 0% 486 ± 0% ~ (p=0.556 n=5+4) _noDirectGzip_decode-4 50.0 ± 0% 50.0 ± 0% ~ (all equal) _jsonBody-4 130 ± 0% 130 ± 0% ~ (all equal) _jsonBodyValidation-4 187 ± 0% 187 ± 0% ~ (all equal) _outputHeaders-4 36.0 ± 0% 36.0 ± 0% ~ (all equal) _requestResponseMapping-4 125 ± 0% 124 ± 0% ~ (p=0.095 n=4+5) _validation-4 155 ± 0% 155 ± 0% ~ (all equal) _noValidation-4 91.0 ± 0% 91.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 43.0 ± 0% 43.0 ± 0% ~ (all equal) _directGzipHead-4 43.0 ± 0% 43.0 ± 0% ~ (all equal) _noDirectGzip-4 50.2 ± 4% 50.2 ± 4% ~ (p=1.000 n=5+5) _directGzip_decode-4 487 ± 0% 487 ± 0% ~ (p=1.000 n=5+5) _noDirectGzip_decode-4 51.0 ± 0% 51.0 ± 0% ~ (all equal) _htmlResponse-4 146 ± 0% 146 ± 0% ~ (all equal) _jsonBodyManual-4 49.0 ± 0% 49.0 ± 0% ~ (all equal) _jsonBody-4 100 ± 0% 100 ± 0% ~ (all equal) _jsonBodyValidation-4 188 ± 0% 188 ± 0% ~ (all equal) _outputHeaders-4 112 ± 0% 112 ± 0% ~ (all equal) _requestResponseMapping-4 125 ± 0% 125 ± 0% ~ (all equal) _validation-4 156 ± 0% 155 ± 0% ~ (p=0.095 n=4+5) _noValidation-4 92.0 ± 0% 92.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 54.0 ± 0% 54.0 ± 0% ~ (all equal) _ok-4 50.0 ± 0% 50.0 ± 0% ~ (all equal) _invalidBody-4 97.0 ± 0% 97.0 ± 0% ~ (all equal) ```