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

Fix " http: superfluous response.WriteHeader call from ..." on embedded resp setter #209

Closed vearutop closed 1 month ago

vearutop commented 1 month ago
2024/10/06 12:39:59 http: superfluous response.WriteHeader call from github.com/swaggest/rest/response.(*Encoder).WriteSuccessfulResponse (encoder.go:407)

This warning happens when out *response.EmbeddedSetter is used for an HTML output.

github-actions[bot] commented 1 month ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 113 8782 6331 663 1788 1049 (+2) 214.6K (+43B)
github-actions[bot] commented 1 month ago

Go API Changes

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

Unit Test Coverage

total: (statements) 81.2% 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% | | response/encoder.go | | 50.0% | | response/encoder.go:364 | WriteSuccessfulResponse | 100.0% |
Coverage diff with base branch No changes in coverage.
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.12µs ± 0% 1.12µs ± 0% ~ (p=0.095 n=5+5) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 532ns ± 1% 549ns ± 1% +3.37% (p=0.008 n=5+5) DecoderFunc_Decode-4 1.53µs ± 0% 1.55µs ± 1% +1.22% (p=0.002 n=6+6) Decoder_Decode_json-4 18.5µs ± 0% 18.5µs ± 0% ~ (p=0.079 n=5+5) Decoder_Decode_queryObject-4 4.03µs ± 0% 4.07µs ± 0% +1.07% (p=0.002 n=6+6) Decoder_Decode_jsonParam-4 1.50µs ± 0% 1.52µs ± 0% +1.33% (p=0.004 n=5+6) DecoderFactory_SetDecoderFunc-4 1.33µs ± 1% 1.34µs ± 1% +0.93% (p=0.006 n=6+6) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 8.41µs ± 1% 8.37µs ± 0% ~ (p=0.329 n=6+5) Middleware_control-4 2.77µs ± 1% 2.77µs ± 1% ~ (p=0.792 n=5+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.20kB ± 5% 1.20kB ± 0% ~ (p=0.476 n=6+4) 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.12µs ± 0% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-4 549ns ± 1% DecoderFunc_Decode-4 1.55µs ± 1% Decoder_Decode_json-4 18.5µs ± 0% Decoder_Decode_queryObject-4 4.07µs ± 0% Decoder_Decode_jsonParam-4 1.52µs ± 0% DecoderFactory_SetDecoderFunc-4 1.34µs ± 1% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-4 8.37µs ± 0% Middleware_control-4 2.77µ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.20kB ± 0% 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 17.3µs ± 5% 16.7µs ± 0% -3.81% (p=0.016 n=5+4) _directGzipHead-4 17.1µs ± 9% 16.7µs ± 3% ~ (p=0.310 n=5+5) _noDirectGzip-4 106µs ± 1% 105µs ± 1% ~ (p=0.151 n=5+5) _directGzip_decode-4 323µs ± 2% 321µs ± 1% ~ (p=0.310 n=5+5) _noDirectGzip_decode-4 107µs ± 5% 106µs ± 1% ~ (p=0.690 n=5+5) _jsonBody-4 36.0µs ± 1% 36.3µs ± 2% ~ (p=0.151 n=5+5) _jsonBodyValidation-4 40.6µs ± 2% 41.4µs ± 2% ~ (p=0.056 n=5+5) _outputHeaders-4 17.1µs ± 1% 17.1µs ± 1% ~ (p=0.421 n=5+5) _requestResponseMapping-4 34.8µs ± 1% 35.4µs ± 4% ~ (p=0.310 n=5+5) _validation-4 37.9µs ± 1% 38.3µs ± 2% ~ (p=0.421 n=5+5) _noValidation-4 26.3µs ± 4% 26.4µs ± 2% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 16.9µs ± 1% 16.8µs ± 0% ~ (p=0.730 n=5+4) _directGzipHead-4 16.6µs ± 1% 16.8µs ± 2% ~ (p=0.095 n=5+5) _noDirectGzip-4 106µs ± 1% 106µs ± 0% ~ (p=0.548 n=5+5) _directGzip_decode-4 320µs ± 0% 320µs ± 1% ~ (p=1.000 n=5+5) _noDirectGzip_decode-4 106µs ± 0% 106µs ± 1% ~ (p=0.841 n=5+5) _htmlResponse-4 30.0µs ± 1% 30.3µs ± 0% +0.90% (p=0.032 n=5+5) _jsonBodyManual-4 20.9µs ± 1% 21.2µs ± 1% +1.48% (p=0.008 n=5+5) _jsonBody-4 31.6µs ± 1% 32.5µs ± 2% +2.97% (p=0.008 n=5+5) _jsonBodyValidation-4 39.8µs ± 1% 40.7µs ± 1% +2.23% (p=0.008 n=5+5) _outputHeaders-4 29.1µs ± 0% 29.7µs ± 0% +1.77% (p=0.008 n=5+5) _requestResponseMapping-4 33.6µs ± 1% 34.7µs ± 1% +3.03% (p=0.008 n=5+5) _validation-4 36.5µs ± 0% 37.3µs ± 3% ~ (p=0.190 n=4+5) _noValidation-4 25.9µs ± 3% 26.4µs ± 1% +1.92% (p=0.016 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 20.1µs ± 8% 19.2µs ± 0% ~ (p=0.190 n=5+4) _ok-4 19.3µs ± 1% 19.4µs ± 1% ~ (p=0.841 n=5+5) _invalidBody-4 27.9µs ± 5% 27.9µs ± 5% ~ (p=1.000 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.77 ± 5% 0.72 ± 7% -6.21% (p=0.032 n=5+5) _directGzipHead-4 0.74 ± 8% 0.73 ± 6% ~ (p=1.000 n=5+5) _noDirectGzip-4 4.80 ± 5% 4.67 ± 2% ~ (p=0.095 n=5+5) _directGzip_decode-4 10.4 ±10% 10.6 ± 3% ~ (p=0.278 n=5+5) _noDirectGzip_decode-4 4.98 ± 8% 5.00 ± 5% ~ (p=1.000 n=5+5) _jsonBody-4 1.51 ± 5% 1.49 ± 5% ~ (p=0.421 n=5+5) _jsonBodyValidation-4 1.73 ± 6% 1.69 ± 4% ~ (p=0.516 n=5+5) _outputHeaders-4 0.77 ± 8% 0.75 ± 2% ~ (p=0.151 n=5+5) _requestResponseMapping-4 1.43 ± 3% 1.42 ± 5% ~ (p=1.000 n=5+5) _validation-4 1.55 ± 3% 1.57 ± 3% ~ (p=0.516 n=5+5) _noValidation-4 1.10 ± 4% 1.11 ± 3% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 0.73 ± 5% 0.73 ± 4% ~ (p=0.841 n=5+5) _directGzipHead-4 0.74 ± 8% 0.73 ± 3% ~ (p=0.841 n=5+5) _noDirectGzip-4 4.84 ± 3% 4.80 ± 2% ~ (p=1.000 n=5+5) _directGzip_decode-4 10.6 ±10% 10.5 ±11% ~ (p=0.730 n=5+5) _noDirectGzip_decode-4 4.92 ± 6% 4.81 ± 2% ~ (p=0.548 n=5+5) _htmlResponse-4 1.29 ± 6% 1.26 ± 5% ~ (p=0.310 n=5+5) _jsonBodyManual-4 0.92 ± 6% 0.90 ± 4% ~ (p=0.310 n=5+5) _jsonBody-4 1.34 ± 7% 1.37 ±10% ~ (p=0.310 n=5+5) _jsonBodyValidation-4 1.70 ± 6% 1.72 ± 4% ~ (p=0.389 n=5+5) _outputHeaders-4 1.17 ± 6% 1.19 ± 5% ~ (p=0.222 n=5+5) _requestResponseMapping-4 1.44 ± 6% 1.41 ± 5% ~ (p=0.421 n=5+5) _validation-4 1.49 ± 1% 1.56 ± 6% +5.11% (p=0.032 n=5+5) _noValidation-4 1.08 ± 5% 1.12 ± 8% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 0.86 ± 6% 0.85 ± 4% ~ (p=0.690 n=5+5) _ok-4 0.84 ± 4% 0.86 ± 6% ~ (p=0.548 n=5+5) _invalidBody-4 1.17 ± 8% 1.17 ±12% ~ (p=1.000 n=5+5) name old 90%:ms new 90%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-4 1.56 ± 3% 1.53 ± 8% ~ (p=0.310 n=5+5) _directGzipHead-4 1.52 ± 8% 1.51 ± 3% ~ (p=0.690 n=5+5) _noDirectGzip-4 10.0 ± 5% 10.0 ± 5% ~ (p=0.548 n=5+5) _directGzip_decode-4 32.5 ± 9% 32.2 ± 6% ~ (p=1.000 n=5+5) _noDirectGzip_decode-4 10.3 ± 4% 9.9 ± 3% ~ (p=0.151 n=5+5) _jsonBody-4 3.30 ± 9% 3.30 ± 4% ~ (p=0.690 n=5+5) _jsonBodyValidation-4 3.64 ± 5% 3.73 ± 5% ~ (p=0.310 n=5+5) _outputHeaders-4 1.53 ± 2% 1.52 ± 3% ~ (p=1.000 n=5+5) _requestResponseMapping-4 3.16 ± 8% 3.22 ± 6% ~ (p=0.548 n=5+5) _validation-4 3.47 ± 4% 3.47 ± 4% ~ (p=1.000 n=5+5) _noValidation-4 2.41 ± 4% 2.48 ± 7% ~ (p=0.500 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 1.49 ± 5% 1.60 ±13% ~ (p=0.095 n=5+5) _directGzipHead-4 1.54 ± 2% 1.52 ± 4% ~ (p=0.460 n=5+5) _noDirectGzip-4 9.91 ± 0% 9.86 ± 1% ~ (p=0.190 n=4+5) _directGzip_decode-4 31.4 ± 9% 31.4 ± 5% ~ (p=0.889 n=5+5) _noDirectGzip_decode-4 10.2 ± 1% 10.2 ± 3% ~ (p=0.254 n=5+5) _htmlResponse-4 2.79 ± 3% 2.77 ± 4% ~ (p=0.548 n=5+5) _jsonBodyManual-4 1.88 ± 4% 1.90 ± 2% ~ (p=0.421 n=5+5) _jsonBody-4 2.90 ± 2% 3.02 ± 6% ~ (p=0.151 n=5+5) _jsonBodyValidation-4 3.72 ± 2% 3.59 ± 1% -3.55% (p=0.008 n=5+5) _outputHeaders-4 2.67 ± 1% 2.83 ± 3% +5.96% (p=0.008 n=5+5) _requestResponseMapping-4 3.13 ± 4% 3.21 ± 2% ~ (p=0.175 n=5+5) _validation-4 3.33 ± 4% 3.40 ± 4% ~ (p=0.548 n=5+5) _noValidation-4 2.40 ± 6% 2.51 ± 5% +4.79% (p=0.032 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 1.76 ± 8% 1.78 ± 9% ~ (p=0.421 n=5+5) _ok-4 1.77 ± 6% 1.73 ± 1% ~ (p=0.151 n=5+5) _invalidBody-4 2.64 ± 6% 2.76 ± 8% ~ (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-4 2.72 ±14% 2.45 ± 2% ~ (p=0.190 n=5+4) _directGzipHead-4 2.85 ±51% 2.44 ± 2% ~ (p=0.421 n=5+5) _noDirectGzip-4 15.5 ± 4% 16.0 ± 5% ~ (p=0.222 n=5+5) _directGzip_decode-4 61.3 ±13% 59.4 ± 7% ~ (p=0.690 n=5+5) _noDirectGzip_decode-4 15.8 ±12% 15.7 ± 5% ~ (p=0.548 n=5+5) _jsonBody-4 5.15 ± 2% 5.26 ± 7% ~ (p=0.548 n=5+5) _jsonBodyValidation-4 6.03 ± 5% 6.19 ± 6% ~ (p=0.310 n=5+5) _outputHeaders-4 2.67 ± 4% 2.71 ± 2% ~ (p=0.500 n=5+5) _requestResponseMapping-4 5.22 ± 5% 4.94 ± 7% ~ (p=0.151 n=5+5) _validation-4 5.61 ± 4% 5.60 ± 6% ~ (p=0.841 n=5+5) _noValidation-4 4.15 ±12% 4.02 ± 5% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 2.48 ± 6% 2.45 ± 3% ~ (p=0.905 n=5+4) _directGzipHead-4 2.46 ± 3% 2.54 ± 8% ~ (p=0.452 n=5+5) _noDirectGzip-4 15.4 ± 6% 15.4 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-4 60.7 ±12% 59.1 ± 7% ~ (p=0.548 n=5+5) _noDirectGzip_decode-4 15.8 ± 4% 15.8 ± 6% ~ (p=1.000 n=5+5) _htmlResponse-4 4.56 ± 6% 4.49 ± 4% ~ (p=0.690 n=5+5) _jsonBodyManual-4 3.15 ± 8% 3.12 ± 5% ~ (p=1.000 n=5+5) _jsonBody-4 4.61 ± 8% 4.80 ± 7% ~ (p=0.310 n=5+5) _jsonBodyValidation-4 5.55 ± 6% 5.75 ± 7% ~ (p=0.222 n=5+5) _outputHeaders-4 4.37 ± 3% 4.44 ± 5% ~ (p=0.738 n=5+5) _requestResponseMapping-4 4.76 ± 5% 4.94 ± 6% ~ (p=0.151 n=5+5) _validation-4 5.06 ± 5% 5.29 ± 7% ~ (p=0.151 n=5+5) _noValidation-4 4.07 ± 4% 4.04 ± 2% ~ (p=1.000 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 3.28 ±36% 3.02 ±44% ~ (p=0.690 n=5+5) _ok-4 2.70 ± 6% 2.87 ± 6% ~ (p=0.056 n=5+5) _invalidBody-4 4.64 ± 4% 4.62 ± 7% ~ (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-4 4.49 ±33% 4.10 ±38% ~ (p=0.548 n=5+5) _directGzipHead-4 4.64 ±57% 3.66 ±11% ~ (p=0.095 n=5+5) _noDirectGzip-4 21.9 ±18% 21.4 ±13% ~ (p=0.690 n=5+5) _directGzip_decode-4 87.6 ±18% 82.8 ±10% ~ (p=0.310 n=5+5) _noDirectGzip_decode-4 21.4 ±19% 20.2 ±17% ~ (p=0.690 n=5+5) _jsonBody-4 7.44 ± 9% 7.93 ± 9% ~ (p=0.310 n=5+5) _jsonBodyValidation-4 8.38 ± 8% 9.05 ± 9% ~ (p=0.151 n=5+5) _outputHeaders-4 4.58 ± 6% 3.97 ±18% ~ (p=0.056 n=5+5) _requestResponseMapping-4 7.26 ±11% 7.10 ± 5% ~ (p=0.841 n=5+5) _validation-4 8.08 ± 2% 8.23 ±12% ~ (p=0.730 n=4+5) _noValidation-4 5.97 ±22% 5.76 ± 5% ~ (p=0.841 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 4.31 ±21% 4.59 ±69% ~ (p=0.524 n=5+5) _directGzipHead-4 3.75 ± 7% 4.09 ±13% ~ (p=0.548 n=5+5) _noDirectGzip-4 20.2 ±11% 21.8 ±14% ~ (p=0.056 n=5+5) _directGzip_decode-4 82.3 ±13% 89.1 ±12% ~ (p=0.222 n=5+5) _noDirectGzip_decode-4 23.0 ±11% 21.1 ±16% ~ (p=0.222 n=5+5) _htmlResponse-4 6.98 ±32% 6.48 ±11% ~ (p=0.841 n=5+5) _jsonBodyManual-4 5.04 ± 8% 4.94 ±14% ~ (p=0.841 n=5+5) _jsonBody-4 6.72 ± 8% 6.36 ± 9% ~ (p=0.421 n=5+5) _jsonBodyValidation-4 7.89 ± 8% 7.91 ± 3% ~ (p=1.000 n=5+5) _outputHeaders-4 6.33 ± 8% 5.94 ± 7% ~ (p=0.151 n=5+5) _requestResponseMapping-4 6.98 ± 8% 7.09 ±11% ~ (p=1.000 n=5+5) _validation-4 7.16 ±10% 7.95 ±23% ~ (p=0.310 n=5+5) _noValidation-4 5.72 ±10% 5.96 ±13% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 5.22 ±48% 4.49 ±54% ~ (p=0.690 n=5+5) _ok-4 4.06 ±36% 4.29 ±21% ~ (p=0.690 n=5+5) _invalidBody-4 6.52 ± 3% 6.24 ±11% ~ (p=0.421 n=5+5) name old B:rcvd/op new B:rcvd/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-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 57.7k ± 4% 59.9k ± 0% +3.87% (p=0.016 n=5+4) _directGzipHead-4 58.5k ± 8% 60.1k ± 3% ~ (p=0.310 n=5+5) _noDirectGzip-4 9.43k ± 1% 9.49k ± 0% ~ (p=0.135 n=5+5) _directGzip_decode-4 3.09k ± 2% 3.12k ± 1% ~ (p=0.341 n=5+5) _noDirectGzip_decode-4 9.32k ± 5% 9.39k ± 1% ~ (p=0.690 n=5+5) _jsonBody-4 27.8k ± 1% 27.5k ± 2% ~ (p=0.151 n=5+5) _jsonBodyValidation-4 24.6k ± 2% 24.2k ± 2% ~ (p=0.056 n=5+5) _outputHeaders-4 58.6k ± 1% 58.3k ± 1% ~ (p=0.421 n=5+5) _requestResponseMapping-4 28.7k ± 1% 28.3k ± 4% ~ (p=0.310 n=5+5) _validation-4 26.4k ± 1% 26.1k ± 3% ~ (p=0.421 n=5+5) _noValidation-4 38.0k ± 4% 37.9k ± 2% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64 _directGzip-4 59.3k ± 1% 59.5k ± 0% ~ (p=0.730 n=5+4) _directGzipHead-4 60.3k ± 1% 59.6k ± 2% ~ (p=0.095 n=5+5) _noDirectGzip-4 9.42k ± 1% 9.41k ± 0% ~ (p=0.548 n=5+5) _directGzip_decode-4 3.13k ± 0% 3.13k ± 1% ~ (p=1.000 n=5+5) _noDirectGzip_decode-4 9.41k ± 0% 9.39k ± 1% ~ (p=0.952 n=5+5) _htmlResponse-4 33.3k ± 1% 33.0k ± 0% -0.89% (p=0.032 n=5+5) _jsonBodyManual-4 47.8k ± 1% 47.1k ± 1% -1.46% (p=0.008 n=5+5) _jsonBody-4 31.7k ± 1% 30.8k ± 2% -2.87% (p=0.008 n=5+5) _jsonBodyValidation-4 25.1k ± 1% 24.5k ± 1% -2.18% (p=0.008 n=5+5) _outputHeaders-4 34.3k ± 0% 33.7k ± 0% -1.75% (p=0.008 n=5+5) _requestResponseMapping-4 29.7k ± 1% 28.9k ± 1% -2.94% (p=0.008 n=5+5) _validation-4 27.4k ± 0% 26.8k ± 3% ~ (p=0.190 n=4+5) _noValidation-4 38.6k ± 3% 37.9k ± 1% -1.91% (p=0.016 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-4 50.0k ± 8% 52.2k ± 0% ~ (p=0.190 n=5+4) _ok-4 51.7k ± 1% 51.6k ± 1% ~ (p=0.841 n=5+5) _invalidBody-4 35.9k ± 5% 35.8k ± 5% ~ (p=1.000 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.960 n=5+5) _directGzipHead-4 3.99kB ± 0% 3.99kB ± 0% ~ (p=0.397 n=5+5) _noDirectGzip-4 7.23kB ±17% 7.52kB ±20% ~ (p=0.690 n=5+5) _directGzip_decode-4 398kB ± 0% 398kB ± 0% ~ (p=1.000 n=5+5) _noDirectGzip_decode-4 6.48kB ±19% 6.15kB ±13% ~ (p=0.548 n=5+5) _jsonBody-4 13.7kB ± 0% 13.7kB ± 0% ~ (p=0.079 n=5+5) _jsonBodyValidation-4 19.5kB ± 0% 19.5kB ± 0% ~ (p=0.421 n=5+5) _outputHeaders-4 3.71kB ± 0% 3.71kB ± 0% ~ (p=0.397 n=5+5) _requestResponseMapping-4 16.8kB ± 0% 16.8kB ± 0% ~ (p=0.159 n=5+5) _validation-4 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.175 n=5+5) _noValidation-4 7.92kB ± 0% 7.92kB ± 0% ~ (p=0.167 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.278 n=5+5) _directGzipHead-4 4.00kB ± 0% 4.00kB ± 0% ~ (p=0.286 n=5+5) _noDirectGzip-4 7.72kB ±22% 7.49kB ±25% ~ (p=0.690 n=5+5) _directGzip_decode-4 398kB ± 0% 398kB ± 0% ~ (p=0.548 n=5+5) _noDirectGzip_decode-4 6.96kB ± 8% 6.77kB ± 7% ~ (p=0.690 n=5+5) _htmlResponse-4 8.55kB ± 0% 8.55kB ± 0% ~ (p=0.444 n=5+5) _jsonBodyManual-4 4.96kB ± 0% 4.96kB ± 0% ~ (p=0.968 n=5+4) _jsonBody-4 10.7kB ± 0% 10.7kB ± 0% +0.05% (p=0.008 n=5+5) _jsonBodyValidation-4 19.6kB ± 0% 19.6kB ± 0% ~ (p=0.230 n=5+5) _outputHeaders-4 10.5kB ± 0% 10.5kB ± 0% ~ (p=0.294 n=5+5) _requestResponseMapping-4 16.8kB ± 0% 16.8kB ± 0% ~ (p=1.000 n=5+5) _validation-4 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.444 n=5+5) _noValidation-4 7.96kB ± 0% 7.96kB ± 0% ~ (p=0.579 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.484 n=5+5) _ok-4 5.13kB ± 0% 5.13kB ± 0% ~ (p=1.000 n=4+4) _invalidBody-4 8.81kB ± 0% 8.81kB ± 0% ~ (p=0.686 n=4+4) name old allocs/op new allocs/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-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.651 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 124 ± 0% 124 ± 0% ~ (all equal) _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+4) _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) ```