Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handler option to document text req body, fix req setter and loader #135

Merged
merged 3 commits into from
Feb 9, 2023

Conversation

vearutop
Copy link
Member

@vearutop vearutop commented Feb 9, 2023

No description provided.

@github-actions
Copy link

github-actions bot commented Feb 9, 2023

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 106 (+1) 7595 (+107) 5526 (+86) 498 (+2) 1571 (+19) 925 183.7K (+2.9K)
Go (test) 48 (+1) 5259 (+66) 4026 (+51) 185 1048 (+15) 179 147K (+1.9K)
JSON 3 1515 (+44) 1515 (+44) 0 0 0 62.5K (+2.5K)
YAML 10 731 626 46 59 0 22.9K (-31B)

@github-actions
Copy link

github-actions bot commented Feb 9, 2023

Go API Changes

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

# summary
Inferred base version: v0.2.40
Suggested version: v0.3.0

@github-actions
Copy link

github-actions bot commented Feb 9, 2023

Unit Test Coverage

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

Coverage of changed lines
File Function Coverage
Total 100.0%
nethttp/options.go 100.0%
nethttp/options.go:37 RequestBodyContent 100.0%
request/factory.go 100.0%
request/factory.go:153 initDecoder 100.0%
Coverage diff with base branch
File Function Base Coverage Current Coverage
Total 83.3% 83.3% (0.0%)
github.com/swaggest/rest/nethttp/options.go RequestBodyContent no function 100.0%

@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Merging #135 (232ec33) into master (f931b97) will increase coverage by 0.12%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
+ Coverage   77.46%   77.58%   +0.12%     
==========================================
  Files          28       28              
  Lines        1575     1584       +9     
==========================================
+ Hits         1220     1229       +9     
  Misses        233      233              
  Partials      122      122              
Flag Coverage Δ
unittests 77.58% <100.00%> (+0.12%) ⬆️

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

Impacted Files Coverage Δ
nethttp/handler.go 85.22% <ø> (ø)
nethttp/options.go 88.88% <100.00%> (+2.04%) ⬆️
request/factory.go 87.70% <100.00%> (+0.20%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

github-actions bot commented Feb 9, 2023

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.35µs ± 3%    1.36µs ± 4%    ~     (p=1.000 n=6+6)
pkg:github.com/swaggest/rest/request goos:linux goarch:amd64
Decoder_Decode-2                           673ns ± 1%     682ns ± 1%  +1.25%  (p=0.032 n=5+5)
DecoderFunc_Decode-2                      1.92µs ± 1%    1.93µs ± 2%    ~     (p=0.299 n=6+6)
Decoder_Decode_json-2                     22.0µs ± 1%    21.7µs ± 1%  -1.50%  (p=0.009 n=6+6)
Decoder_Decode_queryObject-2              4.78µs ± 2%    4.72µs ± 0%  -1.21%  (p=0.004 n=6+5)
Decoder_Decode_jsonParam-2                1.88µs ± 1%    1.86µs ± 1%  -1.16%  (p=0.009 n=6+6)
DecoderFactory_SetDecoderFunc-2           1.65µs ± 1%    1.65µs ± 1%    ~     (p=0.851 n=6+6)
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-2                              11.0µs ± 1%    10.9µs ± 1%    ~     (p=0.699 n=6+6)
Middleware_control-2                      3.39µs ± 3%    3.36µs ± 6%    ~     (p=0.485 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.16kB ± 3%    1.17kB ± 6%    ~     (p=0.974 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.36µs ± 4%
pkg:github.com/swaggest/rest/request goos:linux goarch:amd64
Decoder_Decode-2                         682ns ± 1%
DecoderFunc_Decode-2                    1.93µs ± 2%
Decoder_Decode_json-2                   21.7µs ± 1%
Decoder_Decode_queryObject-2            4.72µs ± 0%
Decoder_Decode_jsonParam-2              1.86µs ± 1%
DecoderFactory_SetDecoderFunc-2         1.65µs ± 1%
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-2                            10.9µs ± 1%
Middleware_control-2                    3.36µs ± 6%

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 ± 6%
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
Copy link

github-actions bot commented Feb 9, 2023

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                41.2µs ±16%    39.9µs ± 6%     ~     (p=0.690 n=5+5)
_directGzipHead-2            37.9µs ± 2%    39.7µs ± 7%   +4.74%  (p=0.032 n=5+5)
_noDirectGzip-2               184µs ± 3%     187µs ± 2%     ~     (p=0.310 n=5+5)
_directGzip_decode-2          589µs ± 4%     604µs ± 5%     ~     (p=0.548 n=5+5)
_noDirectGzip_decode-2        194µs ± 3%     189µs ± 1%     ~     (p=0.151 n=5+5)
_jsonBody-2                  76.2µs ± 4%    76.9µs ± 3%     ~     (p=0.548 n=5+5)
_jsonBodyValidation-2        84.2µs ± 4%    85.9µs ± 4%     ~     (p=0.310 n=5+5)
_outputHeaders-2             41.0µs ± 3%    40.8µs ± 3%     ~     (p=0.690 n=5+5)
_requestResponseMapping-2    74.2µs ± 3%    75.3µs ± 4%     ~     (p=0.310 n=5+5)
_validation-2                78.5µs ± 4%    80.1µs ± 5%     ~     (p=0.310 n=5+5)
_noValidation-2              59.6µs ± 4%    59.8µs ± 4%     ~     (p=0.841 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                43.2µs ±18%    42.5µs ± 7%     ~     (p=0.690 n=5+5)
_directGzipHead-2            42.1µs ± 3%    41.2µs ± 2%     ~     (p=0.056 n=5+5)
_noDirectGzip-2               168µs ± 2%     170µs ± 4%     ~     (p=0.690 n=5+5)
_directGzip_decode-2          578µs ± 1%     600µs ± 5%     ~     (p=0.151 n=5+5)
_noDirectGzip_decode-2        173µs ± 3%     170µs ± 3%     ~     (p=0.421 n=5+5)
_htmlResponse-2              67.1µs ± 4%    67.0µs ± 3%     ~     (p=1.000 n=5+5)
_jsonBodyManual-2            73.2µs ± 2%    50.3µs ± 4%  -31.20%  (p=0.008 n=5+5)
_jsonBody-2                  73.6µs ± 5%    69.7µs ± 3%   -5.27%  (p=0.032 n=5+5)
_jsonBodyValidation-2        90.9µs ± 3%    88.3µs ± 4%     ~     (p=0.056 n=5+5)
_outputHeaders-2             46.5µs ± 3%    46.8µs ± 5%     ~     (p=1.000 n=5+5)
_requestResponseMapping-2    80.5µs ± 4%    77.3µs ± 3%     ~     (p=0.056 n=5+5)
_validation-2                86.1µs ± 3%    82.8µs ± 4%     ~     (p=0.056 n=5+5)
_noValidation-2              64.0µs ± 3%    61.5µs ± 1%   -3.98%  (p=0.008 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2               44.1µs ± 4%    43.8µs ±11%     ~     (p=0.151 n=5+5)
_ok-2                        46.9µs ±19%    42.7µs ± 4%   -8.82%  (p=0.016 n=5+5)
_invalidBody-2               63.1µs ± 5%    60.7µs ± 3%     ~     (p=0.056 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.88 ± 5%      1.94 ± 7%     ~     (p=0.690 n=5+5)
_directGzipHead-2              1.78 ± 6%      1.85 ± 6%     ~     (p=0.421 n=5+5)
_noDirectGzip-2                8.47 ± 4%      8.66 ± 4%     ~     (p=0.310 n=5+5)
_directGzip_decode-2           22.2 ± 6%      22.2 ±10%     ~     (p=0.841 n=5+5)
_noDirectGzip_decode-2         9.17 ± 4%      8.67 ± 2%   -5.50%  (p=0.016 n=5+5)
_jsonBody-2                    3.65 ± 5%      3.64 ± 6%     ~     (p=1.000 n=5+5)
_jsonBodyValidation-2          3.97 ± 5%      4.08 ± 6%     ~     (p=0.421 n=5+5)
_outputHeaders-2               1.96 ± 4%      1.94 ± 7%     ~     (p=0.690 n=5+5)
_requestResponseMapping-2      3.38 ± 7%      3.40 ± 4%     ~     (p=0.421 n=5+5)
_validation-2                  3.53 ± 3%      3.61 ±10%     ~     (p=0.548 n=5+5)
_noValidation-2                2.77 ± 8%      2.69 ± 7%     ~     (p=0.421 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                  2.02 ±11%      2.11 ± 9%     ~     (p=0.310 n=5+5)
_directGzipHead-2              2.00 ± 6%      1.98 ± 8%     ~     (p=1.000 n=5+5)
_noDirectGzip-2                7.85 ± 3%      8.21 ± 5%     ~     (p=0.056 n=5+5)
_directGzip_decode-2           23.0 ± 4%      23.6 ± 5%     ~     (p=0.278 n=5+5)
_noDirectGzip_decode-2         8.04 ± 4%      8.06 ± 3%     ~     (p=0.690 n=5+5)
_htmlResponse-2                3.07 ± 6%      3.12 ± 4%     ~     (p=0.548 n=5+5)
_jsonBodyManual-2              3.33 ± 5%      2.40 ± 8%  -27.91%  (p=0.008 n=5+5)
_jsonBody-2                    3.30 ± 7%      3.20 ± 3%     ~     (p=0.548 n=5+5)
_jsonBodyValidation-2          4.17 ± 7%      3.94 ± 2%     ~     (p=0.095 n=5+5)
_outputHeaders-2               2.22 ± 4%      2.28 ± 7%     ~     (p=0.421 n=5+5)
_requestResponseMapping-2      3.58 ± 5%      3.47 ± 7%     ~     (p=0.310 n=5+5)
_validation-2                  3.96 ± 5%      3.81 ± 2%     ~     (p=0.095 n=5+5)
_noValidation-2                2.90 ± 7%      2.79 ± 6%     ~     (p=0.421 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2                 2.11 ± 6%      2.16 ± 7%     ~     (p=0.333 n=5+5)
_ok-2                          2.21 ± 5%      2.10 ± 5%     ~     (p=0.095 n=5+5)
_invalidBody-2                 2.86 ± 6%      2.78 ± 3%     ~     (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.54 ±13%      3.41 ± 3%     ~     (p=0.548 n=5+5)
_directGzipHead-2              3.19 ± 1%      3.39 ± 5%   +6.41%  (p=0.008 n=5+5)
_noDirectGzip-2                17.3 ± 6%      17.4 ± 4%     ~     (p=0.690 n=5+5)
_directGzip_decode-2           50.1 ±11%      50.7 ± 9%     ~     (p=0.841 n=5+5)
_noDirectGzip_decode-2         18.3 ± 4%      17.6 ± 4%     ~     (p=0.167 n=5+5)
_jsonBody-2                    6.64 ±10%      6.68 ± 5%     ~     (p=0.690 n=5+5)
_jsonBodyValidation-2          7.14 ± 4%      7.45 ± 5%     ~     (p=0.095 n=5+5)
_outputHeaders-2               3.51 ± 7%      3.43 ± 7%     ~     (p=0.690 n=5+5)
_requestResponseMapping-2      6.31 ± 3%      6.49 ± 4%     ~     (p=0.095 n=5+5)
_validation-2                  6.84 ± 6%      7.07 ±12%     ~     (p=0.548 n=5+5)
_noValidation-2                5.20 ± 6%      5.39 ± 4%     ~     (p=0.222 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                  3.63 ±21%      3.56 ± 9%     ~     (p=0.548 n=5+5)
_directGzipHead-2              3.55 ± 5%      3.53 ± 8%     ~     (p=1.000 n=5+5)
_noDirectGzip-2                14.9 ± 8%      15.5 ± 5%     ~     (p=0.222 n=5+5)
_directGzip_decode-2           46.0 ± 7%      50.5 ±10%     ~     (p=0.095 n=5+5)
_noDirectGzip_decode-2         15.7 ± 6%      15.0 ± 6%     ~     (p=0.222 n=5+5)
_htmlResponse-2                5.82 ± 4%      5.70 ± 4%     ~     (p=0.222 n=5+5)
_jsonBodyManual-2              6.32 ± 4%      4.21 ± 4%  -33.31%  (p=0.008 n=5+5)
_jsonBody-2                    6.61 ± 7%      6.00 ± 3%   -9.30%  (p=0.016 n=5+5)
_jsonBodyValidation-2          7.91 ± 7%      7.85 ± 9%     ~     (p=0.548 n=5+5)
_outputHeaders-2               4.04 ± 5%      4.02 ±10%     ~     (p=0.841 n=5+5)
_requestResponseMapping-2      7.01 ± 5%      6.88 ± 2%     ~     (p=0.421 n=5+5)
_validation-2                  7.54 ±10%      7.11 ± 5%     ~     (p=0.111 n=5+5)
_noValidation-2                5.64 ± 8%      5.51 ± 2%     ~     (p=0.690 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2                 3.71 ± 8%      3.75 ±12%     ~     (p=0.548 n=5+5)
_ok-2                          3.94 ±18%      3.52 ± 5%  -10.62%  (p=0.016 n=5+5)
_invalidBody-2                 5.64 ± 5%      5.34 ± 8%     ~     (p=0.095 n=5+5)

name                       old 99%:ms     new 99%:ms     delta
pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64
_directGzip-2                  7.46 ±74%      5.52 ± 6%     ~     (p=0.690 n=5+5)
_directGzipHead-2              5.42 ±18%      5.79 ±25%     ~     (p=0.548 n=5+5)
_noDirectGzip-2                23.5 ±10%      23.1 ± 2%     ~     (p=1.000 n=5+5)
_directGzip_decode-2           81.6 ±12%      89.8 ±13%     ~     (p=0.222 n=5+5)
_noDirectGzip_decode-2         24.0 ± 5%      23.6 ± 3%     ~     (p=0.310 n=5+5)
_jsonBody-2                    10.4 ±12%       9.6 ± 9%     ~     (p=0.222 n=5+5)
_jsonBodyValidation-2          10.9 ±12%      10.9 ±12%     ~     (p=1.000 n=5+5)
_outputHeaders-2               6.04 ±13%      6.11 ± 7%     ~     (p=0.690 n=5+5)
_requestResponseMapping-2      10.5 ±16%      10.9 ±10%     ~     (p=0.690 n=5+5)
_validation-2                  11.5 ±18%      11.6 ±20%     ~     (p=1.000 n=5+5)
_noValidation-2                8.76 ±10%      9.37 ±11%     ~     (p=0.421 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                  5.37 ± 5%      5.75 ±12%     ~     (p=0.413 n=4+5)
_directGzipHead-2              5.92 ± 7%      5.73 ±15%     ~     (p=0.310 n=5+5)
_noDirectGzip-2                22.1 ± 2%      21.8 ± 3%     ~     (p=0.310 n=5+5)
_directGzip_decode-2           78.1 ±12%      83.3 ±13%     ~     (p=0.310 n=5+5)
_noDirectGzip_decode-2         22.5 ± 5%      21.9 ± 4%     ~     (p=0.310 n=5+5)
_htmlResponse-2                9.46 ± 7%      9.12 ± 6%     ~     (p=0.222 n=5+5)
_jsonBodyManual-2              10.6 ±15%       7.5 ± 9%  -29.56%  (p=0.008 n=5+5)
_jsonBody-2                    10.5 ±13%       9.5 ± 5%     ~     (p=0.095 n=5+5)
_jsonBodyValidation-2          12.4 ±10%      11.5 ± 6%     ~     (p=0.087 n=5+5)
_outputHeaders-2               6.68 ± 3%      6.94 ±19%     ~     (p=1.000 n=5+5)
_requestResponseMapping-2      11.2 ±10%      11.0 ± 4%     ~     (p=0.841 n=5+5)
_validation-2                  12.1 ±23%      11.7 ± 9%     ~     (p=1.000 n=5+5)
_noValidation-2                9.18 ± 5%      9.32 ±10%     ~     (p=0.841 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2                 5.85 ± 6%      5.67 ± 2%     ~     (p=0.556 n=5+4)
_ok-2                          6.22 ± 8%      5.45 ± 9%     ~     (p=0.063 n=4+5)
_invalidBody-2                 9.56 ± 6%      8.88 ± 7%   -7.11%  (p=0.032 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                  11.8 ±51%       9.6 ±40%     ~     (p=0.690 n=5+5)
_directGzipHead-2              9.95 ±27%      9.64 ±21%     ~     (p=1.000 n=5+5)
_noDirectGzip-2                27.8 ±10%      27.0 ± 5%     ~     (p=0.690 n=5+5)
_directGzip_decode-2            111 ±24%       110 ±21%     ~     (p=0.841 n=5+5)
_noDirectGzip_decode-2         29.2 ±18%      31.0 ±11%     ~     (p=0.690 n=5+5)
_jsonBody-2                    14.8 ±14%      17.1 ±54%     ~     (p=0.690 n=5+5)
_jsonBodyValidation-2          15.1 ±19%      15.9 ±23%     ~     (p=0.548 n=5+5)
_outputHeaders-2               11.0 ±28%      10.0 ±23%     ~     (p=0.421 n=5+5)
_requestResponseMapping-2      17.1 ±41%      15.9 ±37%     ~     (p=0.421 n=5+5)
_validation-2                  19.0 ±37%      17.4 ±27%     ~     (p=0.690 n=5+5)
_noValidation-2                15.8 ±34%      15.4 ±24%     ~     (p=1.000 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                 12.6 ±117%      10.8 ±38%     ~     (p=0.841 n=5+5)
_directGzipHead-2              10.4 ±29%       9.5 ±28%     ~     (p=0.421 n=5+5)
_noDirectGzip-2                27.6 ±20%      25.8 ± 8%     ~     (p=0.421 n=5+5)
_directGzip_decode-2            100 ±21%       106 ±10%     ~     (p=0.690 n=5+5)
_noDirectGzip_decode-2         28.4 ±17%      24.6 ±18%     ~     (p=0.151 n=5+5)
_htmlResponse-2                14.7 ± 7%      12.9 ±23%     ~     (p=0.151 n=5+5)
_jsonBodyManual-2              14.9 ±39%      12.2 ±56%     ~     (p=0.151 n=5+5)
_jsonBody-2                    18.0 ±34%      13.0 ±24%     ~     (p=0.056 n=5+5)
_jsonBodyValidation-2          17.9 ±17%      16.4 ±32%     ~     (p=0.222 n=5+5)
_outputHeaders-2               10.6 ±31%      10.8 ±17%     ~     (p=0.690 n=5+5)
_requestResponseMapping-2      17.5 ±31%      16.8 ±10%     ~     (p=0.421 n=5+5)
_validation-2                  16.1 ±24%      15.8 ±21%     ~     (p=1.000 n=5+5)
_noValidation-2                13.6 ±23%      13.8 ± 6%     ~     (p=0.690 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2                 9.16 ±24%     12.87 ±60%     ~     (p=0.056 n=5+5)
_ok-2                          13.6 ±70%       8.3 ±57%     ~     (p=0.056 n=5+5)
_invalidBody-2                 17.5 ±56%      12.5 ±30%     ~     (p=0.095 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                185 ± 0%       185 ± 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                           343 ± 0%       344 ± 0%     ~     (p=0.238 n=5+4)
_invalidBody-2                  420 ± 0%       420 ± 0%     ~     (all equal)

name                       old B:sent/op  new B:sent/op  delta
pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64
_directGzip-2                   103 ± 0%       103 ± 0%     ~     (all equal)
_directGzipHead-2               104 ± 0%       104 ± 0%     ~     (all equal)
_noDirectGzip-2                 117 ± 0%       117 ± 0%     ~     (all equal)
_directGzip_decode-2            116 ± 0%       116 ± 0%     ~     (all equal)
_noDirectGzip_decode-2          130 ± 0%       130 ± 0%     ~     (all equal)
_jsonBody-2                     188 ± 0%       188 ± 0%     ~     (all equal)
_jsonBodyValidation-2           192 ± 0%       192 ± 0%     ~     (all equal)
_outputHeaders-2               77.0 ± 0%      77.0 ± 0%     ~     (all equal)
_requestResponseMapping-2       169 ± 0%       169 ± 0%     ~     (all equal)
_validation-2                   170 ± 0%       170 ± 0%     ~     (all equal)
_noValidation-2                 173 ± 0%       173 ± 0%     ~     (all equal)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                   103 ± 0%       103 ± 0%     ~     (all equal)
_directGzipHead-2               104 ± 0%       104 ± 0%     ~     (all equal)
_noDirectGzip-2                 117 ± 0%       117 ± 0%     ~     (all equal)
_directGzip_decode-2            116 ± 0%       116 ± 0%     ~     (all equal)
_noDirectGzip_decode-2          130 ± 0%       130 ± 0%     ~     (all equal)
_htmlResponse-2                 108 ± 0%       108 ± 0%     ~     (all equal)
_jsonBodyManual-2               195 ± 0%       195 ± 0%     ~     (all equal)
_jsonBody-2                     188 ± 0%       188 ± 0%     ~     (all equal)
_jsonBodyValidation-2           192 ± 0%       192 ± 0%     ~     (all equal)
_outputHeaders-2               77.0 ± 0%      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                 24.4k ±14%     25.1k ± 7%     ~     (p=0.690 n=5+5)
_directGzipHead-2             26.4k ± 2%     25.2k ± 7%   -4.42%  (p=0.032 n=5+5)
_noDirectGzip-2               5.43k ± 3%     5.35k ± 2%     ~     (p=0.310 n=5+5)
_directGzip_decode-2          1.70k ± 4%     1.66k ± 5%     ~     (p=0.500 n=5+5)
_noDirectGzip_decode-2        5.15k ± 3%     5.28k ± 1%     ~     (p=0.151 n=5+5)
_jsonBody-2                   13.1k ± 4%     13.0k ± 3%     ~     (p=0.548 n=5+5)
_jsonBodyValidation-2         11.9k ± 4%     11.6k ± 4%     ~     (p=0.310 n=5+5)
_outputHeaders-2              24.4k ± 3%     24.5k ± 3%     ~     (p=0.690 n=5+5)
_requestResponseMapping-2     13.5k ± 3%     13.3k ± 4%     ~     (p=0.310 n=5+5)
_validation-2                 12.8k ± 4%     12.5k ± 5%     ~     (p=0.310 n=5+5)
_noValidation-2               16.8k ± 4%     16.7k ± 4%     ~     (p=0.841 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                 23.3k ±16%     23.6k ± 7%     ~     (p=0.690 n=5+5)
_directGzipHead-2             23.8k ± 3%     24.3k ± 2%     ~     (p=0.056 n=5+5)
_noDirectGzip-2               5.95k ± 2%     5.87k ± 4%     ~     (p=0.690 n=5+5)
_directGzip_decode-2          1.73k ± 2%     1.67k ± 5%     ~     (p=0.151 n=5+5)
_noDirectGzip_decode-2        5.78k ± 3%     5.88k ± 3%     ~     (p=0.421 n=5+5)
_htmlResponse-2               14.9k ± 4%     14.9k ± 3%     ~     (p=1.000 n=5+5)
_jsonBodyManual-2             13.7k ± 2%     19.9k ± 4%  +45.37%  (p=0.008 n=5+5)
_jsonBody-2                   13.6k ± 5%     14.4k ± 3%   +5.49%  (p=0.032 n=5+5)
_jsonBodyValidation-2         11.0k ± 3%     11.3k ± 4%     ~     (p=0.056 n=5+5)
_outputHeaders-2              21.5k ± 3%     21.4k ± 5%     ~     (p=1.000 n=5+5)
_requestResponseMapping-2     12.4k ± 4%     12.9k ± 3%     ~     (p=0.056 n=5+5)
_validation-2                 11.6k ± 3%     12.1k ± 4%     ~     (p=0.056 n=5+5)
_noValidation-2               15.6k ± 3%     16.3k ± 1%   +4.09%  (p=0.008 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2                22.7k ± 4%     22.9k ±10%     ~     (p=0.151 n=5+5)
_ok-2                         21.5k ±16%     23.4k ± 4%   +8.90%  (p=0.016 n=5+5)
_invalidBody-2                15.8k ± 5%     16.5k ± 3%     ~     (p=0.056 n=5+5)

name                       old alloc/op   new alloc/op   delta
pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64
_directGzip-2                3.87kB ± 0%    3.88kB ± 0%     ~     (p=0.111 n=5+5)
_directGzipHead-2            3.87kB ± 0%    3.88kB ± 0%     ~     (p=0.071 n=5+5)
_noDirectGzip-2              7.60kB ±11%    7.42kB ±14%     ~     (p=0.841 n=5+5)
_directGzip_decode-2          403kB ± 0%     403kB ± 0%     ~     (p=0.548 n=5+5)
_noDirectGzip_decode-2       6.37kB ± 9%    5.82kB ±10%     ~     (p=0.056 n=5+5)
_jsonBody-2                  13.1kB ± 0%    13.1kB ± 0%     ~     (p=0.579 n=5+5)
_jsonBodyValidation-2        19.0kB ± 0%    19.0kB ± 0%     ~     (p=0.421 n=5+5)
_outputHeaders-2             3.60kB ± 0%    3.60kB ± 0%     ~     (p=0.468 n=5+5)
_requestResponseMapping-2    16.6kB ± 0%    16.6kB ± 0%     ~     (p=0.794 n=5+5)
_validation-2                16.5kB ± 0%    16.5kB ± 0%     ~     (p=0.968 n=5+5)
_noValidation-2              7.79kB ± 0%    7.80kB ± 0%     ~     (p=0.087 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                3.93kB ± 0%    3.93kB ± 0%     ~     (p=0.595 n=5+5)
_directGzipHead-2            3.92kB ± 0%    3.92kB ± 0%     ~     (p=0.722 n=5+5)
_noDirectGzip-2              7.09kB ±18%    7.38kB ±24%     ~     (p=0.310 n=5+5)
_directGzip_decode-2          403kB ± 0%     403kB ± 0%     ~     (p=0.548 n=5+5)
_noDirectGzip_decode-2       5.90kB ± 8%    5.83kB ±11%     ~     (p=1.000 n=5+5)
_htmlResponse-2              8.08kB ± 0%    8.08kB ± 0%     ~     (p=0.302 n=5+5)
_jsonBodyManual-2            10.3kB ± 0%     4.5kB ± 0%  -55.97%  (p=0.008 n=5+5)
_jsonBody-2                  10.3kB ± 0%    10.3kB ± 0%     ~     (p=0.175 n=5+5)
_jsonBodyValidation-2        19.1kB ± 0%    19.1kB ± 0%     ~     (p=0.595 n=5+5)
_outputHeaders-2             4.25kB ± 0%    4.25kB ± 0%     ~     (p=0.960 n=5+5)
_requestResponseMapping-2    16.7kB ± 0%    16.7kB ± 0%     ~     (p=0.238 n=5+5)
_validation-2                16.6kB ± 0%    16.6kB ± 0%     ~     (p=1.000 n=5+5)
_noValidation-2              7.86kB ± 0%    7.86kB ± 0%     ~     (p=0.413 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2               4.66kB ± 0%    4.66kB ± 0%     ~     (p=0.556 n=5+5)
_ok-2                        4.57kB ± 0%    4.56kB ± 0%     ~     (p=0.343 n=4+4)
_invalidBody-2               8.40kB ± 4%    8.37kB ± 4%     ~     (p=0.643 n=5+5)

name                       old allocs/op  new allocs/op  delta
pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64
_directGzip-2                  42.0 ± 0%      42.0 ± 0%     ~     (all equal)
_directGzipHead-2              42.0 ± 0%      42.0 ± 0%     ~     (all equal)
_noDirectGzip-2                50.2 ± 4%      51.0 ± 0%     ~     (p=0.556 n=5+4)
_directGzip_decode-2            505 ± 0%       504 ± 0%     ~     (p=0.413 n=5+4)
_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       125 ± 0%       125 ± 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                52.0 ± 4%      52.2 ± 4%     ~     (p=1.000 n=5+5)
_directGzip_decode-2            507 ± 0%       506 ± 0%     ~     (p=0.143 n=4+5)
_noDirectGzip_decode-2         52.0 ± 0%      52.0 ± 0%     ~     (all equal)
_htmlResponse-2                 145 ± 0%       145 ± 0%     ~     (all equal)
_jsonBodyManual-2               100 ± 0%        49 ± 0%  -51.00%  (p=0.008 n=5+5)
_jsonBody-2                     100 ± 0%       100 ± 0%     ~     (all equal)
_jsonBodyValidation-2           187 ± 0%       187 ± 0%     ~     (all equal)
_outputHeaders-2               45.0 ± 0%      45.0 ± 0%     ~     (all equal)
_requestResponseMapping-2       127 ± 0%       127 ± 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.8 ± 2%      97.0 ± 0%     ~     (p=0.333 n=5+4)

@vearutop vearutop merged commit 9e8e48a into master Feb 9, 2023
@vearutop vearutop deleted the text-req-body branch February 9, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant