swaggest / rest

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

Remove charset attribute from JSON content type #126

Closed vearutop closed 1 year ago

vearutop commented 1 year ago

Resolves #113.

github-actions[bot] commented 1 year ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 105 7310 5306 488 1516 882 176.5K (-44B)
Go (test) 47 5141 3933 185 1023 179 143.3K (-90B)
github-actions[bot] commented 1 year ago

Unit Test Coverage

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

Coverage of changed lines | File | Function | Coverage | |--------------------------|-----------|----------| | Total | | 100.0% | | openapi/collector.go | | 100.0% | | openapi/collector.go:540 | ServeHTTP | 100.0% |
Coverage diff with base branch No changes in coverage.
github-actions[bot] commented 1 year ago

Go API Changes

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

Codecov Report

Merging #126 (cc162c9) into master (ec752e0) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #126   +/-   ##
=======================================
  Coverage   77.62%   77.62%           
=======================================
  Files          28       28           
  Lines        1493     1493           
=======================================
  Hits         1159     1159           
  Misses        217      217           
  Partials      117      117           
Flag Coverage Δ
unittests 77.62% <100.00%> (ø)

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

Impacted Files Coverage Δ
response/encoder.go 64.16% <ø> (ø)
openapi/collector.go 63.43% <100.00%> (ø)

: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.36µs ± 2% 1.38µs ± 7% ~ (p=0.931 n=5+6) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 694ns ± 0% 697ns ± 0% +0.35% (p=0.009 n=6+5) DecoderFunc_Decode-2 2.01µs ± 0% 2.00µs ± 1% ~ (p=0.883 n=5+6) Decoder_Decode_json-2 22.8µs ± 1% 22.9µs ± 1% ~ (p=0.589 n=6+6) Decoder_Decode_queryObject-2 4.97µs ± 0% 4.98µs ± 0% ~ (p=0.134 n=6+5) Decoder_Decode_jsonParam-2 1.95µs ± 0% 1.95µs ± 1% +0.36% (p=0.039 n=6+6) DecoderFactory_SetDecoderFunc-2 1.68µs ± 0% 1.68µs ± 0% +0.45% (p=0.013 n=6+5) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.6µs ± 1% 11.7µs ± 1% ~ (p=0.329 n=6+5) Middleware_control-2 3.26µs ± 1% 3.25µs ± 1% ~ (p=0.389 n=5+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.15kB ± 3% 1.17kB ± 4% ~ (p=0.450 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.38µs ± 7% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 697ns ± 0% DecoderFunc_Decode-2 2.00µs ± 1% Decoder_Decode_json-2 22.9µs ± 1% Decoder_Decode_queryObject-2 4.98µs ± 0% Decoder_Decode_jsonParam-2 1.95µs ± 1% DecoderFactory_SetDecoderFunc-2 1.68µs ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.7µs ± 1% Middleware_control-2 3.25µs ± 1% 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 ± 4% Middleware_control-2 11.2kB ± 0% name allocs/op pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 8.00 ± 0% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 4.00 ± 0% DecoderFunc_Decode-2 12.0 ± 0% Decoder_Decode_json-2 177 ± 0% Decoder_Decode_queryObject-2 36.0 ± 0% Decoder_Decode_jsonParam-2 13.0 ± 0% DecoderFactory_SetDecoderFunc-2 16.0 ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.0 ± 0% Middleware_control-2 9.00 ± 0% ```
github-actions[bot] commented 1 year ago

Examples Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 22.1µs ± 1% 22.2µs ± 2% ~ (p=0.421 n=5+5) _directGzipHead-2 22.8µs ±11% 22.0µs ± 1% ~ (p=0.421 n=5+5) _noDirectGzip-2 124µs ± 4% 123µs ± 1% ~ (p=1.000 n=5+5) _directGzip_decode-2 446µs ± 1% 447µs ± 2% ~ (p=0.841 n=5+5) _noDirectGzip_decode-2 123µs ± 1% 123µs ± 2% ~ (p=0.841 n=5+5) _jsonBody-2 40.3µs ± 1% 40.9µs ± 1% +1.57% (p=0.032 n=5+5) _jsonBodyValidation-2 46.4µs ± 2% 46.5µs ± 1% ~ (p=1.000 n=5+5) _outputHeaders-2 21.5µs ± 4% 21.2µs ± 1% ~ (p=0.548 n=5+5) _requestResponseMapping-2 40.3µs ± 1% 40.2µs ± 1% ~ (p=0.310 n=5+5) _validation-2 43.1µs ± 1% 44.0µs ± 4% +1.97% (p=0.032 n=5+5) _noValidation-2 31.1µs ± 1% 31.5µs ± 2% ~ (p=0.056 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 22.6µs ± 2% 23.8µs ±14% ~ (p=0.095 n=5+5) _directGzipHead-2 23.5µs ±12% 22.6µs ± 1% ~ (p=0.222 n=5+5) _noDirectGzip-2 122µs ± 8% 121µs ± 2% ~ (p=1.000 n=5+5) _directGzip_decode-2 448µs ± 2% 448µs ± 3% ~ (p=0.841 n=5+5) _noDirectGzip_decode-2 119µs ± 1% 120µs ± 1% +0.80% (p=0.032 n=5+5) _htmlResponse-2 36.3µs ± 2% 36.5µs ± 2% ~ (p=0.651 n=5+5) _jsonBodyManual-2 25.7µs ± 2% 26.2µs ± 1% ~ (p=0.095 n=5+5) _jsonBody-2 37.8µs ± 2% 37.4µs ± 2% ~ (p=0.421 n=5+5) _jsonBodyValidation-2 48.1µs ± 1% 47.7µs ± 1% ~ (p=0.222 n=5+5) _outputHeaders-2 22.1µs ± 2% 22.0µs ± 1% ~ (p=1.000 n=5+5) _requestResponseMapping-2 40.2µs ± 1% 40.8µs ± 3% ~ (p=0.151 n=5+5) _validation-2 42.9µs ± 2% 44.2µs ± 0% +2.91% (p=0.008 n=5+5) _noValidation-2 31.6µs ± 2% 33.0µs ± 3% +4.32% (p=0.032 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 25.2µs ± 2% 25.3µs ± 1% ~ (p=0.413 n=5+4) _ok-2 26.8µs ±15% 25.7µs ± 1% ~ (p=0.310 n=5+5) _invalidBody-2 36.1µs ± 2% 36.5µs ± 1% ~ (p=0.222 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.05 ± 5% 1.06 ± 3% ~ (p=0.310 n=5+5) _directGzipHead-2 1.10 ± 4% 1.05 ± 5% ~ (p=0.095 n=5+5) _noDirectGzip-2 6.11 ± 6% 5.86 ± 2% ~ (p=0.095 n=5+5) _directGzip_decode-2 17.3 ± 6% 17.6 ± 6% ~ (p=0.310 n=5+5) _noDirectGzip_decode-2 6.04 ± 4% 5.94 ± 4% ~ (p=0.690 n=5+5) _jsonBody-2 1.87 ± 6% 1.91 ± 7% ~ (p=0.421 n=5+5) _jsonBodyValidation-2 2.11 ± 3% 2.16 ± 7% ~ (p=0.690 n=5+5) _outputHeaders-2 1.01 ± 9% 1.03 ± 7% ~ (p=0.690 n=5+5) _requestResponseMapping-2 1.80 ± 5% 1.69 ± 3% -5.73% (p=0.032 n=5+5) _validation-2 1.89 ± 4% 1.92 ± 7% ~ (p=0.841 n=5+5) _noValidation-2 1.46 ± 5% 1.40 ± 4% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 1.10 ± 8% 1.13 ± 7% ~ (p=0.310 n=5+5) _directGzipHead-2 1.11 ± 8% 1.09 ± 6% ~ (p=0.690 n=5+5) _noDirectGzip-2 5.83 ± 6% 5.80 ± 8% ~ (p=0.690 n=5+5) _directGzip_decode-2 17.8 ± 3% 17.6 ± 1% ~ (p=0.548 n=5+5) _noDirectGzip_decode-2 5.88 ± 4% 5.89 ± 4% ~ (p=1.000 n=5+5) _htmlResponse-2 1.65 ± 4% 1.70 ± 7% ~ (p=0.690 n=5+5) _jsonBodyManual-2 1.23 ± 4% 1.26 ± 5% ~ (p=0.548 n=5+5) _jsonBody-2 1.70 ± 2% 1.70 ± 4% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 2.08 ± 3% 2.12 ± 8% ~ (p=0.690 n=5+5) _outputHeaders-2 1.05 ± 3% 1.02 ± 6% ~ (p=0.222 n=5+5) _requestResponseMapping-2 1.77 ± 5% 1.80 ± 4% ~ (p=0.421 n=5+5) _validation-2 1.96 ± 5% 1.99 ± 6% ~ (p=0.310 n=5+5) _noValidation-2 1.43 ± 7% 1.48 ± 5% ~ (p=0.151 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 1.22 ± 6% 1.25 ± 9% ~ (p=0.690 n=5+5) _ok-2 1.28 ± 8% 1.25 ± 4% ~ (p=0.841 n=5+5) _invalidBody-2 1.67 ± 8% 1.67 ± 5% ~ (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-2 1.90 ± 1% 1.84 ± 4% ~ (p=0.111 n=4+5) _directGzipHead-2 1.85 ± 7% 1.91 ± 6% ~ (p=0.310 n=5+5) _noDirectGzip-2 10.7 ± 6% 10.6 ± 7% ~ (p=0.690 n=5+5) _directGzip_decode-2 38.8 ± 7% 38.7 ± 7% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 10.8 ± 4% 10.8 ± 4% ~ (p=0.881 n=5+5) _jsonBody-2 3.65 ± 8% 3.62 ± 5% ~ (p=1.000 n=5+5) _jsonBodyValidation-2 4.06 ± 3% 4.10 ± 3% ~ (p=0.548 n=5+5) _outputHeaders-2 1.80 ± 8% 1.78 ± 5% ~ (p=0.690 n=5+5) _requestResponseMapping-2 3.72 ± 2% 3.67 ± 4% ~ (p=0.548 n=5+5) _validation-2 3.93 ± 6% 3.99 ± 4% ~ (p=0.548 n=5+5) _noValidation-2 2.73 ± 7% 2.75 ± 3% ~ (p=0.548 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 1.88 ± 2% 1.89 ± 4% ~ (p=1.000 n=5+5) _directGzipHead-2 1.91 ± 5% 1.97 ± 4% ~ (p=0.222 n=5+5) _noDirectGzip-2 10.7 ± 8% 10.3 ± 5% ~ (p=0.341 n=5+5) _directGzip_decode-2 38.8 ± 4% 38.0 ± 3% ~ (p=0.198 n=5+5) _noDirectGzip_decode-2 10.2 ± 2% 10.5 ± 3% ~ (p=0.222 n=5+5) _htmlResponse-2 3.17 ± 5% 3.15 ± 3% ~ (p=1.000 n=5+5) _jsonBodyManual-2 2.20 ± 4% 2.20 ± 5% ~ (p=0.516 n=5+5) _jsonBody-2 3.40 ± 4% 3.33 ± 7% ~ (p=0.421 n=5+5) _jsonBodyValidation-2 4.39 ± 6% 4.30 ± 2% ~ (p=0.690 n=5+5) _outputHeaders-2 1.80 ± 4% 1.83 ± 8% ~ (p=0.548 n=5+5) _requestResponseMapping-2 3.76 ± 5% 3.87 ± 7% ~ (p=0.548 n=5+5) _validation-2 3.94 ± 7% 4.13 ± 2% ~ (p=0.095 n=5+5) _noValidation-2 2.69 ± 3% 2.89 ± 8% +7.42% (p=0.016 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 2.15 ± 4% 2.21 ± 6% ~ (p=0.310 n=5+5) _ok-2 2.23 ± 7% 2.16 ± 7% ~ (p=0.548 n=5+5) _invalidBody-2 3.23 ± 5% 3.25 ± 9% ~ (p=0.841 n=5+5) name old 99%:ms new 99%:ms delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 3.15 ± 4% 3.19 ±12% ~ (p=1.000 n=5+5) _directGzipHead-2 3.22 ± 9% 3.14 ±12% ~ (p=0.556 n=4+5) _noDirectGzip-2 14.8 ± 9% 14.3 ± 5% ~ (p=0.690 n=5+5) _directGzip_decode-2 64.1 ±15% 65.2 ± 9% ~ (p=0.690 n=5+5) _noDirectGzip_decode-2 14.8 ± 3% 14.4 ± 5% ~ (p=0.151 n=5+5) _jsonBody-2 5.58 ± 5% 5.78 ± 3% ~ (p=0.421 n=5+5) _jsonBodyValidation-2 6.52 ± 9% 6.28 ± 5% ~ (p=0.222 n=5+5) _outputHeaders-2 3.67 ±27% 3.42 ± 5% ~ (p=0.841 n=5+5) _requestResponseMapping-2 6.83 ±16% 6.83 ±11% ~ (p=1.000 n=5+5) _validation-2 7.14 ±17% 8.22 ±26% ~ (p=0.222 n=5+5) _noValidation-2 4.95 ±12% 5.28 ±13% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 3.19 ± 6% 3.33 ± 8% ~ (p=0.286 n=5+4) _directGzipHead-2 3.31 ± 6% 3.30 ± 9% ~ (p=0.905 n=4+5) _noDirectGzip-2 15.1 ±33% 14.5 ± 2% ~ (p=0.548 n=5+5) _directGzip_decode-2 68.4 ±24% 64.0 ± 6% ~ (p=0.421 n=5+5) _noDirectGzip_decode-2 14.1 ± 6% 14.1 ± 3% ~ (p=0.841 n=5+5) _htmlResponse-2 5.54 ±10% 5.63 ± 8% ~ (p=0.690 n=5+5) _jsonBodyManual-2 3.81 ± 9% 4.11 ±11% ~ (p=0.222 n=5+5) _jsonBody-2 6.74 ±14% 5.78 ±15% ~ (p=0.056 n=5+5) _jsonBodyValidation-2 7.86 ±21% 7.85 ±15% ~ (p=0.841 n=5+5) _outputHeaders-2 3.96 ±23% 3.79 ± 7% ~ (p=1.000 n=5+5) _requestResponseMapping-2 6.39 ± 9% 6.54 ±11% ~ (p=0.738 n=5+5) _validation-2 6.20 ±13% 6.93 ± 6% ~ (p=0.095 n=5+5) _noValidation-2 5.21 ±12% 5.65 ±10% ~ (p=0.222 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 3.49 ± 6% 3.50 ± 3% ~ (p=0.730 n=5+4) _ok-2 3.58 ± 7% 3.58 ± 5% ~ (p=0.730 n=4+5) _invalidBody-2 5.89 ± 8% 6.04 ±12% ~ (p=1.000 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 6.39 ±33% 6.51 ±28% ~ (p=1.000 n=5+5) _directGzipHead-2 9.50 ±79% 7.02 ±48% ~ (p=0.421 n=5+5) _noDirectGzip-2 18.2 ±15% 18.2 ±17% ~ (p=0.841 n=5+5) _directGzip_decode-2 78.2 ±13% 84.3 ± 6% ~ (p=0.222 n=5+5) _noDirectGzip_decode-2 18.5 ±10% 17.9 ± 9% ~ (p=0.310 n=5+5) _jsonBody-2 8.85 ±21% 11.02 ±38% ~ (p=0.310 n=5+5) _jsonBodyValidation-2 11.1 ±35% 9.8 ±14% ~ (p=0.421 n=5+5) _outputHeaders-2 10.3 ±44% 8.7 ±48% ~ (p=0.421 n=5+5) _requestResponseMapping-2 12.1 ±14% 13.5 ±11% ~ (p=0.151 n=5+5) _validation-2 12.8 ±25% 13.6 ±13% ~ (p=0.421 n=5+5) _noValidation-2 8.38 ± 7% 11.43 ±35% ~ (p=0.190 n=4+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 5.44 ±31% 10.30 ±75% ~ (p=0.056 n=5+5) _directGzipHead-2 10.8 ±44% 5.7 ± 7% -47.08% (p=0.032 n=5+4) _noDirectGzip-2 21.4 ±69% 18.0 ±14% ~ (p=1.000 n=5+5) _directGzip_decode-2 88.6 ±14% 78.6 ±15% ~ (p=0.095 n=5+5) _noDirectGzip_decode-2 17.1 ±11% 20.1 ±17% ~ (p=0.151 n=5+5) _htmlResponse-2 10.8 ±37% 10.1 ±29% ~ (p=0.421 n=5+5) _jsonBodyManual-2 8.41 ±27% 9.16 ±36% ~ (p=0.690 n=5+5) _jsonBody-2 12.8 ±27% 11.1 ±35% ~ (p=0.421 n=5+5) _jsonBodyValidation-2 14.4 ±23% 13.7 ±25% ~ (p=0.421 n=5+5) _outputHeaders-2 11.1 ±24% 10.4 ±26% ~ (p=0.841 n=5+5) _requestResponseMapping-2 10.7 ±19% 11.8 ±12% ~ (p=0.310 n=5+5) _validation-2 11.3 ±15% 12.0 ±21% ~ (p=0.690 n=5+5) _noValidation-2 8.92 ±34% 11.16 ±44% ~ (p=0.310 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 6.36 ±20% 8.97 ±71% ~ (p=0.310 n=5+5) _ok-2 10.0 ±76% 6.1 ±40% ~ (p=0.095 n=5+5) _invalidBody-2 8.92 ±16% 9.00 ±23% ~ (p=0.841 n=5+5) name old B:rcvd/op new B:rcvd/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 639 ± 0% 624 ± 0% -2.35% (p=0.008 n=5+5) _directGzipHead-2 183 ± 0% 168 ± 0% -8.20% (p=0.008 n=5+5) _noDirectGzip-2 1.04k ± 0% 1.03k ± 0% -1.44% (p=0.008 n=5+5) _directGzip_decode-2 639 ± 0% 624 ± 0% -2.35% (p=0.008 n=5+5) _noDirectGzip_decode-2 1.04k ± 0% 1.03k ± 0% -1.44% (p=0.008 n=5+5) _jsonBody-2 208 ± 0% 193 ± 0% -7.21% (p=0.008 n=5+5) _jsonBodyValidation-2 194 ± 0% 179 ± 0% -7.73% (p=0.008 n=5+5) _outputHeaders-2 155 ± 0% 140 ± 0% -9.68% (p=0.008 n=5+5) _requestResponseMapping-2 94.0 ± 0% 94.0 ± 0% ~ (all equal) _validation-2 177 ± 0% 162 ± 0% -8.47% (p=0.008 n=5+5) _noValidation-2 177 ± 0% 162 ± 0% -8.47% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 653 ± 0% 638 ± 0% -2.30% (p=0.008 n=5+5) _directGzipHead-2 197 ± 0% 182 ± 0% -7.61% (p=0.008 n=5+5) _noDirectGzip-2 1.06k ± 0% 1.04k ± 0% -1.42% (p=0.008 n=5+5) _directGzip_decode-2 653 ± 0% 638 ± 0% -2.30% (p=0.008 n=5+5) _noDirectGzip_decode-2 1.06k ± 0% 1.04k ± 0% -1.42% (p=0.008 n=5+5) _htmlResponse-2 370 ± 0% 370 ± 0% ~ (all equal) _jsonBodyManual-2 222 ± 0% 207 ± 0% -6.76% (p=0.008 n=5+5) _jsonBody-2 222 ± 0% 207 ± 0% -6.76% (p=0.008 n=5+5) _jsonBodyValidation-2 208 ± 0% 193 ± 0% -7.21% (p=0.008 n=5+5) _outputHeaders-2 169 ± 0% 154 ± 0% -8.88% (p=0.008 n=5+5) _requestResponseMapping-2 108 ± 0% 108 ± 0% ~ (all equal) _validation-2 191 ± 0% 176 ± 0% -7.85% (p=0.008 n=5+5) _noValidation-2 191 ± 0% 176 ± 0% -7.85% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 337 ± 0% 322 ± 0% -4.45% (p=0.008 n=5+5) _ok-2 359 ± 0% 344 ± 0% -4.18% (p=0.008 n=5+5) _invalidBody-2 435 ± 0% 420 ± 0% -3.45% (p=0.008 n=5+5) name old B:sent/op new B:sent/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 103 ± 0% 103 ± 0% ~ (all equal) _directGzipHead-2 104 ± 0% 104 ± 0% ~ (all equal) _noDirectGzip-2 117 ± 0% 117 ± 0% ~ (all equal) _directGzip_decode-2 116 ± 0% 116 ± 0% ~ (all equal) _noDirectGzip_decode-2 130 ± 0% 130 ± 0% ~ (all equal) _jsonBody-2 188 ± 0% 188 ± 0% ~ (all equal) _jsonBodyValidation-2 192 ± 0% 192 ± 0% ~ (all equal) _outputHeaders-2 77.0 ± 0% 77.0 ± 0% ~ (all equal) _requestResponseMapping-2 169 ± 0% 169 ± 0% ~ (all equal) _validation-2 170 ± 0% 170 ± 0% ~ (all equal) _noValidation-2 173 ± 0% 173 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 103 ± 0% 103 ± 0% ~ (all equal) _directGzipHead-2 104 ± 0% 104 ± 0% ~ (all equal) _noDirectGzip-2 117 ± 0% 117 ± 0% ~ (all equal) _directGzip_decode-2 116 ± 0% 116 ± 0% ~ (all equal) _noDirectGzip_decode-2 130 ± 0% 130 ± 0% ~ (all equal) _htmlResponse-2 108 ± 0% 108 ± 0% ~ (all equal) _jsonBodyManual-2 195 ± 0% 195 ± 0% ~ (all equal) _jsonBody-2 188 ± 0% 188 ± 0% ~ (all equal) _jsonBodyValidation-2 192 ± 0% 192 ± 0% ~ (all equal) _outputHeaders-2 77.0 ± 0% 77.0 ± 0% ~ (all equal) _requestResponseMapping-2 169 ± 0% 169 ± 0% ~ (all equal) _validation-2 170 ± 0% 170 ± 0% ~ (all equal) _noValidation-2 173 ± 0% 173 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 74.0 ± 0% 74.0 ± 0% ~ (all equal) _ok-2 74.0 ± 0% 74.0 ± 0% ~ (all equal) _invalidBody-2 137 ± 0% 137 ± 0% ~ (all equal) name old rps new rps delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 45.3k ± 1% 44.9k ± 2% ~ (p=0.421 n=5+5) _directGzipHead-2 44.0k ±11% 45.5k ± 1% ~ (p=0.421 n=5+5) _noDirectGzip-2 8.09k ± 4% 8.15k ± 1% ~ (p=1.000 n=5+5) _directGzip_decode-2 2.24k ± 1% 2.24k ± 2% ~ (p=0.889 n=5+5) _noDirectGzip_decode-2 8.11k ± 1% 8.10k ± 2% ~ (p=0.841 n=5+5) _jsonBody-2 24.8k ± 1% 24.4k ± 1% -1.54% (p=0.032 n=5+5) _jsonBodyValidation-2 21.6k ± 1% 21.5k ± 1% ~ (p=1.000 n=5+5) _outputHeaders-2 46.5k ± 3% 47.1k ± 1% ~ (p=0.548 n=5+5) _requestResponseMapping-2 24.8k ± 1% 24.9k ± 1% ~ (p=0.310 n=5+5) _validation-2 23.2k ± 1% 22.7k ± 4% -1.89% (p=0.032 n=5+5) _noValidation-2 32.1k ± 1% 31.7k ± 2% ~ (p=0.056 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 44.2k ± 2% 42.2k ±13% ~ (p=0.095 n=5+5) _directGzipHead-2 42.6k ±11% 44.2k ± 1% ~ (p=0.222 n=5+5) _noDirectGzip-2 8.20k ± 7% 8.30k ± 2% ~ (p=1.000 n=5+5) _directGzip_decode-2 2.23k ± 2% 2.23k ± 3% ~ (p=0.841 n=5+5) _noDirectGzip_decode-2 8.38k ± 1% 8.31k ± 1% -0.79% (p=0.032 n=5+5) _htmlResponse-2 27.6k ± 2% 27.4k ± 2% ~ (p=0.690 n=5+5) _jsonBodyManual-2 38.8k ± 2% 38.2k ± 1% ~ (p=0.095 n=5+5) _jsonBody-2 26.5k ± 2% 26.7k ± 2% ~ (p=0.421 n=5+5) _jsonBodyValidation-2 20.8k ± 1% 20.9k ± 1% ~ (p=0.151 n=5+5) _outputHeaders-2 45.3k ± 2% 45.5k ± 1% ~ (p=1.000 n=5+5) _requestResponseMapping-2 24.9k ± 1% 24.5k ± 3% ~ (p=0.151 n=5+5) _validation-2 23.3k ± 2% 22.6k ± 0% -2.84% (p=0.008 n=5+5) _noValidation-2 31.6k ± 2% 30.3k ± 3% -4.11% (p=0.016 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 39.8k ± 2% 39.6k ± 1% ~ (p=0.413 n=5+4) _ok-2 37.5k ±13% 39.0k ± 1% ~ (p=0.310 n=5+5) _invalidBody-2 27.7k ± 2% 27.4k ± 1% ~ (p=0.222 n=5+5) name old alloc/op new alloc/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 3.94kB ± 0% 3.94kB ± 0% ~ (p=0.563 n=5+5) _directGzipHead-2 3.94kB ± 0% 3.94kB ± 0% ~ (p=0.429 n=5+5) _noDirectGzip-2 6.69kB ±16% 6.58kB ±26% ~ (p=1.000 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.841 n=5+5) _noDirectGzip_decode-2 5.85kB ± 5% 6.08kB ±12% ~ (p=0.841 n=5+5) _jsonBody-2 13.2kB ± 0% 13.2kB ± 0% ~ (p=0.817 n=5+5) _jsonBodyValidation-2 19.0kB ± 0% 19.0kB ± 0% ~ (p=0.714 n=5+5) _outputHeaders-2 3.71kB ± 0% 3.71kB ± 0% ~ (p=0.619 n=5+5) _requestResponseMapping-2 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.889 n=5+5) _validation-2 16.6kB ± 0% 16.6kB ± 0% ~ (p=0.238 n=5+5) _noValidation-2 7.89kB ± 0% 7.89kB ± 0% ~ (p=0.373 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 3.99kB ± 0% 3.99kB ± 0% ~ (all equal) _directGzipHead-2 3.99kB ± 0% 3.98kB ± 0% ~ (p=0.198 n=5+5) _noDirectGzip-2 6.71kB ±21% 6.73kB ±19% ~ (p=1.000 n=5+5) _directGzip_decode-2 403kB ± 0% 403kB ± 0% ~ (p=0.421 n=5+5) _noDirectGzip_decode-2 5.88kB ± 5% 5.99kB ±13% ~ (p=0.841 n=5+5) _htmlResponse-2 8.25kB ± 0% 8.25kB ± 0% ~ (p=0.810 n=5+5) _jsonBodyManual-2 4.65kB ± 0% 4.65kB ± 0% ~ (p=0.722 n=5+5) _jsonBody-2 10.4kB ± 0% 10.4kB ± 0% ~ (p=0.357 n=5+5) _jsonBodyValidation-2 19.1kB ± 0% 19.1kB ± 0% ~ (p=0.556 n=5+5) _outputHeaders-2 3.74kB ± 0% 3.74kB ± 0% ~ (p=0.683 n=5+5) _requestResponseMapping-2 16.8kB ± 0% 16.8kB ± 0% ~ (p=0.190 n=5+5) _validation-2 16.7kB ± 0% 16.7kB ± 0% ~ (p=0.865 n=5+5) _noValidation-2 7.95kB ± 0% 7.95kB ± 0% ~ (p=0.571 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 4.89kB ± 0% 4.89kB ± 0% ~ (p=0.627 n=5+5) _ok-2 4.79kB ± 0% 4.79kB ± 0% ~ (p=0.657 n=4+4) _invalidBody-2 8.63kB ± 0% 8.63kB ± 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-2 42.0 ± 0% 42.0 ± 0% ~ (all equal) _directGzipHead-2 42.0 ± 0% 42.0 ± 0% ~ (all equal) _noDirectGzip-2 49.4 ± 3% 49.4 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 502 ± 0% 502 ± 0% ~ (p=0.571 n=5+5) _noDirectGzip_decode-2 50.0 ± 0% 50.0 ± 0% ~ (all equal) _jsonBody-2 130 ± 0% 130 ± 0% ~ (all equal) _jsonBodyValidation-2 186 ± 0% 186 ± 0% ~ (all equal) _outputHeaders-2 37.0 ± 0% 37.0 ± 0% ~ (all equal) _requestResponseMapping-2 126 ± 0% 126 ± 0% ~ (all equal) _validation-2 155 ± 0% 155 ± 0% ~ (all equal) _noValidation-2 92.0 ± 0% 92.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 44.0 ± 0% 44.0 ± 0% ~ (all equal) _directGzipHead-2 44.0 ± 0% 44.0 ± 0% ~ (all equal) _noDirectGzip-2 51.4 ± 3% 51.4 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 504 ± 0% 504 ± 0% ~ (p=1.000 n=5+4) _noDirectGzip_decode-2 52.0 ± 0% 52.0 ± 0% ~ (all equal) _htmlResponse-2 145 ± 0% 145 ± 0% ~ (all equal) _jsonBodyManual-2 51.0 ± 0% 51.0 ± 0% ~ (all equal) _jsonBody-2 102 ± 0% 102 ± 0% ~ (all equal) _jsonBodyValidation-2 188 ± 0% 188 ± 0% ~ (all equal) _outputHeaders-2 38.0 ± 0% 38.0 ± 0% ~ (all equal) _requestResponseMapping-2 128 ± 0% 128 ± 0% ~ (all equal) _validation-2 157 ± 0% 157 ± 0% ~ (all equal) _noValidation-2 94.0 ± 0% 94.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 54.0 ± 0% 54.0 ± 0% ~ (all equal) _ok-2 50.0 ± 0% 50.0 ± 0% ~ (all equal) _invalidBody-2 99.0 ± 0% 99.0 ± 0% ~ (all equal) ```