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 uuid setup example #94

Merged
merged 1 commit into from
Nov 10, 2022
Merged

Add uuid setup example #94

merged 1 commit into from
Nov 10, 2022

Conversation

vearutop
Copy link
Member

Fixes #93.

@github-actions
Copy link

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 101 7004 (+20) 5086 (+16) 466 (+2) 1452 (+2) 847 169.3K (+814B)
JSON 3 1342 (+10) 1342 (+10) 0 0 0 55.3K (+594B)

@github-actions
Copy link

Go API Changes

# summary
Inferred base version: v0.2.33
Suggested version: v0.2.34

@github-actions
Copy link

Unit Test Coverage

total: (statements) 83.5%

Coverage of changed lines

No changes in testable statements.

Coverage diff with base branch

No changes in coverage.

@codecov
Copy link

codecov bot commented Nov 10, 2022

Codecov Report

Merging #94 (972f4bb) into master (adf4d98) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #94   +/-   ##
=======================================
  Coverage   77.57%   77.57%           
=======================================
  Files          27       27           
  Lines        1436     1436           
=======================================
  Hits         1114     1114           
  Misses        207      207           
  Partials      115      115           
Flag Coverage Δ
unittests 77.57% <ø> (ø)

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

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

@vearutop vearutop merged commit 18cad16 into master Nov 10, 2022
@vearutop vearutop deleted the uuid-example branch November 10, 2022 09:18
@github-actions
Copy link

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.38µs ± 9%    1.35µs ± 6%    ~     (p=0.087 n=5+5)
pkg:github.com/swaggest/rest/request goos:linux goarch:amd64
Decoder_Decode-2                           690ns ± 0%     683ns ± 0%  -1.00%  (p=0.016 n=5+4)
DecoderFunc_Decode-2                      1.99µs ± 8%    1.95µs ± 1%    ~     (p=0.548 n=5+5)
Decoder_Decode_json-2                     22.5µs ± 1%    22.5µs ± 1%    ~     (p=1.000 n=5+5)
Decoder_Decode_queryObject-2              4.98µs ± 0%    4.95µs ± 0%  -0.52%  (p=0.008 n=5+5)
Decoder_Decode_jsonParam-2                1.94µs ± 0%    1.93µs ± 0%    ~     (p=0.063 n=4+5)
DecoderFactory_SetDecoderFunc-2           1.66µs ± 0%    1.66µs ± 1%    ~     (p=0.159 n=5+5)
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-2                              11.4µs ± 0%    11.9µs ± 9%    ~     (p=0.151 n=5+5)
Middleware_control-2                      3.28µs ± 7%    3.34µs ± 6%    ~     (p=0.095 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.16kB ± 4%    1.15kB ± 3%    ~     (p=0.690 n=5+5)
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.35µs ± 6%
pkg:github.com/swaggest/rest/request goos:linux goarch:amd64
Decoder_Decode-2                         683ns ± 0%
DecoderFunc_Decode-2                    1.95µs ± 1%
Decoder_Decode_json-2                   22.5µs ± 1%
Decoder_Decode_queryObject-2            4.95µs ± 0%
Decoder_Decode_jsonParam-2              1.93µs ± 0%
DecoderFactory_SetDecoderFunc-2         1.66µs ± 1%
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-2                            11.9µs ± 9%
Middleware_control-2                    3.34µ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.15kB ± 3%
Middleware_control-2                    11.2kB ± 0%

name                                    allocs/op
pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64
RequestValidator_ValidateRequestData-2    8.00 ± 0%
pkg:github.com/swaggest/rest/request goos:linux goarch:amd64
Decoder_Decode-2                          4.00 ± 0%
DecoderFunc_Decode-2                      12.0 ± 0%
Decoder_Decode_json-2                      177 ± 0%
Decoder_Decode_queryObject-2              36.0 ± 0%
Decoder_Decode_jsonParam-2                13.0 ± 0%
DecoderFactory_SetDecoderFunc-2           16.0 ± 0%
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-2                              11.0 ± 0%
Middleware_control-2                      9.00 ± 0%

@github-actions
Copy link

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.8µs ± 1%    23.1µs ± 3%     ~     (p=0.111 n=4+5)
_directGzipHead-2            21.8µs ± 3%    22.4µs ± 4%     ~     (p=0.222 n=5+5)
_noDirectGzip-2               121µs ± 1%     121µs ± 2%     ~     (p=0.690 n=5+5)
_directGzip_decode-2          425µs ± 3%     420µs ± 2%     ~     (p=0.421 n=5+5)
_noDirectGzip_decode-2        127µs ± 1%     120µs ± 1%   -5.10%  (p=0.008 n=5+5)
_jsonBody-2                  41.0µs ± 1%    39.8µs ± 3%   -2.83%  (p=0.032 n=5+5)
_jsonBodyValidation-2        48.3µs ± 4%    45.2µs ± 1%   -6.50%  (p=0.008 n=5+5)
_outputHeaders-2             22.8µs ± 1%    21.0µs ± 2%   -7.72%  (p=0.008 n=5+5)
_requestResponseMapping-2    41.7µs ± 2%    38.8µs ± 2%   -6.85%  (p=0.008 n=5+5)
_validation-2                43.7µs ± 1%    41.9µs ± 4%     ~     (p=0.056 n=5+5)
_noValidation-2              32.7µs ± 2%    32.0µs ± 4%     ~     (p=0.222 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                24.3µs ± 2%    21.9µs ± 1%   -9.59%  (p=0.016 n=5+4)
_directGzipHead-2            23.3µs ± 2%    22.1µs ± 3%   -5.05%  (p=0.008 n=5+5)
_noDirectGzip-2               130µs ± 1%     121µs ± 1%   -7.08%  (p=0.008 n=5+5)
_directGzip_decode-2          486µs ± 4%     433µs ± 4%  -10.90%  (p=0.008 n=5+5)
_noDirectGzip_decode-2        135µs ± 1%     134µs ± 4%     ~     (p=1.000 n=5+5)
_htmlResponse-2              36.1µs ± 0%    37.2µs ± 5%   +3.26%  (p=0.016 n=4+5)
_jsonBodyManual-2            26.7µs ± 1%    26.7µs ± 1%     ~     (p=0.841 n=5+5)
_jsonBody-2                  38.0µs ± 1%    40.4µs ± 7%     ~     (p=0.095 n=5+5)
_jsonBodyValidation-2        48.6µs ± 2%    50.8µs ± 3%   +4.62%  (p=0.016 n=5+5)
_outputHeaders-2             22.7µs ± 1%    23.4µs ± 3%     ~     (p=0.151 n=5+5)
_requestResponseMapping-2    43.9µs ± 9%    42.2µs ± 3%     ~     (p=0.222 n=5+5)
_validation-2                43.4µs ± 7%    45.4µs ± 4%     ~     (p=0.095 n=5+5)
_noValidation-2              31.1µs ± 2%    32.6µs ± 1%   +4.79%  (p=0.008 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2               26.0µs ±12%    26.0µs ± 2%     ~     (p=0.222 n=5+5)
_ok-2                        25.0µs ± 1%    27.0µs ±12%   +8.22%  (p=0.008 n=5+5)
_invalidBody-2               36.5µs ± 5%    37.5µs ± 3%     ~     (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.10 ± 6%      1.14 ± 6%     ~     (p=0.206 n=5+5)
_directGzipHead-2              1.04 ± 8%      1.08 ± 8%     ~     (p=0.310 n=5+5)
_noDirectGzip-2                5.94 ± 4%      5.85 ± 4%     ~     (p=0.421 n=5+5)
_directGzip_decode-2           16.9 ± 5%      17.6 ± 5%     ~     (p=0.095 n=5+5)
_noDirectGzip_decode-2         6.17 ± 5%      5.88 ± 5%   -4.58%  (p=0.032 n=5+5)
_jsonBody-2                    1.82 ± 4%      1.80 ±10%     ~     (p=0.548 n=5+5)
_jsonBodyValidation-2          2.17 ± 8%      2.03 ± 4%   -6.79%  (p=0.016 n=5+5)
_outputHeaders-2               1.07 ± 3%      1.05 ± 7%     ~     (p=0.524 n=5+5)
_requestResponseMapping-2      1.76 ± 7%      1.65 ± 4%   -6.10%  (p=0.032 n=5+5)
_validation-2                  1.96 ± 6%      1.88 ± 9%     ~     (p=0.310 n=5+5)
_noValidation-2                1.47 ± 4%      1.44 ± 7%     ~     (p=0.310 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                  1.15 ± 3%      1.11 ± 3%     ~     (p=0.056 n=5+5)
_directGzipHead-2              1.13 ± 7%      1.04 ± 6%   -7.65%  (p=0.032 n=5+5)
_noDirectGzip-2                6.41 ± 6%      5.86 ± 5%   -8.50%  (p=0.016 n=5+5)
_directGzip_decode-2           19.8 ± 6%      17.7 ± 3%  -10.60%  (p=0.008 n=5+5)
_noDirectGzip_decode-2         6.67 ± 2%      6.45 ± 6%     ~     (p=0.151 n=5+5)
_htmlResponse-2                1.69 ± 8%      1.72 ± 6%     ~     (p=0.841 n=5+5)
_jsonBodyManual-2              1.28 ± 4%      1.25 ± 3%     ~     (p=0.421 n=5+5)
_jsonBody-2                    1.72 ± 8%      1.82 ±10%     ~     (p=0.421 n=5+5)
_jsonBodyValidation-2          2.10 ± 3%      2.31 ±11%     ~     (p=0.151 n=5+5)
_outputHeaders-2               1.07 ± 4%      1.13 ± 6%   +5.49%  (p=0.024 n=5+5)
_requestResponseMapping-2      1.84 ±10%      1.84 ± 7%     ~     (p=1.000 n=5+5)
_validation-2                  1.90 ± 6%      2.01 ± 6%     ~     (p=0.095 n=5+5)
_noValidation-2                1.39 ± 7%      1.51 ± 6%   +8.76%  (p=0.016 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2                 1.22 ± 6%      1.23 ± 5%     ~     (p=1.000 n=5+5)
_ok-2                          1.18 ± 4%      1.28 ± 7%   +8.17%  (p=0.032 n=5+5)
_invalidBody-2                 1.60 ± 8%      1.70 ± 4%     ~     (p=0.095 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.93 ±10%      1.92 ± 1%     ~     (p=0.548 n=5+5)
_directGzipHead-2              1.83 ± 6%      1.88 ± 8%     ~     (p=0.389 n=5+5)
_noDirectGzip-2                10.4 ± 5%      10.6 ± 5%     ~     (p=0.310 n=5+5)
_directGzip_decode-2           36.3 ± 6%      34.4 ± 4%   -5.16%  (p=0.040 n=5+5)
_noDirectGzip_decode-2         10.8 ± 5%      10.6 ± 1%     ~     (p=0.595 n=5+5)
_jsonBody-2                    3.76 ± 6%      3.63 ± 7%     ~     (p=0.421 n=5+5)
_jsonBodyValidation-2          4.40 ± 4%      4.19 ± 8%     ~     (p=0.095 n=5+5)
_outputHeaders-2               1.94 ± 6%      1.72 ± 7%  -11.42%  (p=0.008 n=5+5)
_requestResponseMapping-2      3.98 ± 6%      3.56 ± 4%  -10.52%  (p=0.008 n=5+5)
_validation-2                  4.05 ± 4%      3.95 ± 4%     ~     (p=0.310 n=5+5)
_noValidation-2                2.87 ± 6%      2.86 ± 6%     ~     (p=1.000 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                  2.06 ± 8%      1.87 ± 8%     ~     (p=0.056 n=5+5)
_directGzipHead-2              1.93 ± 3%      1.84 ± 5%     ~     (p=0.056 n=5+5)
_noDirectGzip-2                11.4 ± 2%      10.5 ± 1%   -7.81%  (p=0.008 n=5+5)
_directGzip_decode-2           39.7 ± 3%      36.6 ± 9%     ~     (p=0.056 n=5+5)
_noDirectGzip_decode-2         11.8 ± 4%      11.5 ± 5%     ~     (p=0.421 n=5+5)
_htmlResponse-2                3.23 ± 8%      3.31 ± 3%     ~     (p=0.310 n=5+5)
_jsonBodyManual-2              2.26 ± 5%      2.23 ± 2%     ~     (p=0.310 n=5+5)
_jsonBody-2                    3.50 ± 5%      3.68 ±16%     ~     (p=0.310 n=5+5)
_jsonBodyValidation-2          4.48 ± 5%      4.69 ± 6%     ~     (p=0.151 n=5+5)
_outputHeaders-2               1.90 ± 6%      1.94 ± 4%     ~     (p=0.548 n=5+5)
_requestResponseMapping-2      4.07 ± 6%      4.03 ± 5%     ~     (p=0.841 n=5+5)
_validation-2                  4.08 ± 8%      4.27 ±12%     ~     (p=0.310 n=5+5)
_noValidation-2                2.76 ± 6%      2.91 ± 4%     ~     (p=0.056 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2                 2.18 ± 9%      2.23 ± 3%     ~     (p=0.310 n=5+5)
_ok-2                          2.14 ± 4%      2.22 ±13%     ~     (p=0.690 n=5+5)
_invalidBody-2                 3.24 ± 4%      3.45 ± 6%   +6.51%  (p=0.032 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.22 ± 5%      3.35 ±10%     ~     (p=0.413 n=4+5)
_directGzipHead-2              3.21 ± 7%      3.16 ± 9%     ~     (p=0.595 n=5+5)
_noDirectGzip-2                14.6 ± 6%      14.1 ± 8%     ~     (p=0.222 n=5+5)
_directGzip_decode-2           60.4 ± 7%      57.7 ± 4%     ~     (p=0.095 n=5+5)
_noDirectGzip_decode-2         14.7 ±11%      14.3 ± 8%     ~     (p=0.421 n=5+5)
_jsonBody-2                    6.00 ± 7%      6.16 ±18%     ~     (p=0.841 n=5+5)
_jsonBodyValidation-2          6.91 ± 9%      6.18 ± 4%  -10.48%  (p=0.032 n=5+5)
_outputHeaders-2               3.67 ± 5%      3.40 ± 7%   -7.33%  (p=0.032 n=5+5)
_requestResponseMapping-2      6.07 ±11%      6.10 ± 8%     ~     (p=0.421 n=5+5)
_validation-2                  6.67 ±11%      6.36 ±17%     ~     (p=0.151 n=5+5)
_noValidation-2                5.41 ±14%      5.47 ±16%     ~     (p=0.690 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                  3.56 ± 8%      3.07 ± 4%  -13.66%  (p=0.016 n=5+4)
_directGzipHead-2              3.57 ± 7%      3.23 ± 6%   -9.42%  (p=0.008 n=5+5)
_noDirectGzip-2                15.9 ± 8%      14.4 ± 3%   -9.36%  (p=0.008 n=5+5)
_directGzip_decode-2           67.7 ± 9%      58.8 ±13%  -13.12%  (p=0.008 n=5+5)
_noDirectGzip_decode-2         16.4 ± 5%      16.3 ± 7%     ~     (p=0.738 n=5+5)
_htmlResponse-2                5.40 ± 4%      5.55 ±11%     ~     (p=0.548 n=5+5)
_jsonBodyManual-2              4.08 ± 5%      4.04 ± 2%     ~     (p=0.841 n=5+5)
_jsonBody-2                    5.68 ± 5%      6.23 ±15%     ~     (p=0.222 n=5+5)
_jsonBodyValidation-2          6.95 ±10%      7.76 ±18%     ~     (p=0.151 n=5+5)
_outputHeaders-2               3.72 ± 8%      3.82 ± 8%     ~     (p=0.421 n=5+5)
_requestResponseMapping-2      8.69 ±27%      6.32 ±10%  -27.29%  (p=0.008 n=5+5)
_validation-2                  6.45 ±10%      6.65 ± 8%     ~     (p=0.841 n=5+5)
_noValidation-2                5.21 ±10%      5.26 ± 4%     ~     (p=0.690 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2                 3.50 ± 7%      3.46 ± 5%     ~     (p=0.905 n=4+5)
_ok-2                          3.48 ± 3%      3.58 ± 7%     ~     (p=0.556 n=5+4)
_invalidBody-2                 6.41 ±18%      6.30 ±15%     ~     (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.97 ±90%      5.64 ±50%     ~     (p=1.000 n=5+5)
_directGzipHead-2              6.04 ±29%      5.71 ±22%     ~     (p=1.000 n=5+5)
_noDirectGzip-2                17.9 ±10%      17.8 ±11%     ~     (p=0.889 n=5+5)
_directGzip_decode-2           79.1 ±11%      74.7 ±11%     ~     (p=0.310 n=5+5)
_noDirectGzip_decode-2         18.7 ±24%      19.6 ±20%     ~     (p=0.548 n=5+5)
_jsonBody-2                    10.2 ±45%      10.4 ±36%     ~     (p=1.000 n=5+5)
_jsonBodyValidation-2          12.4 ±27%      10.9 ±33%     ~     (p=0.548 n=5+5)
_outputHeaders-2               6.65 ±19%      7.63 ±31%     ~     (p=0.690 n=5+5)
_requestResponseMapping-2      10.3 ±21%      10.7 ±22%     ~     (p=0.690 n=5+5)
_validation-2                  11.3 ±23%      10.7 ±16%     ~     (p=0.690 n=5+5)
_noValidation-2                10.5 ±42%      10.1 ±41%     ~     (p=1.000 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                  5.94 ±44%     5.84 ±114%     ~     (p=0.310 n=5+5)
_directGzipHead-2              6.82 ±30%      5.67 ±17%     ~     (p=0.151 n=5+5)
_noDirectGzip-2                20.5 ±11%      18.2 ±12%  -11.50%  (p=0.032 n=5+5)
_directGzip_decode-2           84.9 ± 9%      76.4 ±11%     ~     (p=0.151 n=5+5)
_noDirectGzip_decode-2         20.8 ± 4%      21.1 ± 9%     ~     (p=0.905 n=4+5)
_htmlResponse-2                9.94 ±54%      8.86 ±33%     ~     (p=0.421 n=5+5)
_jsonBodyManual-2              8.38 ±30%      7.06 ±30%     ~     (p=0.310 n=5+5)
_jsonBody-2                    8.81 ±33%      8.73 ± 9%     ~     (p=0.310 n=5+5)
_jsonBodyValidation-2          11.8 ±28%      13.6 ±22%     ~     (p=0.310 n=5+5)
_outputHeaders-2               7.11 ±37%      6.62 ± 4%     ~     (p=0.730 n=5+4)
_requestResponseMapping-2      14.0 ±39%      10.8 ±35%     ~     (p=0.095 n=5+5)
_validation-2                  10.2 ±17%      12.1 ±25%     ~     (p=0.056 n=5+5)
_noValidation-2                9.51 ±43%      7.75 ±15%     ~     (p=0.310 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2                 7.20 ±57%      5.52 ±82%     ~     (p=0.151 n=5+5)
_ok-2                          5.19 ±21%     7.27 ±107%     ~     (p=0.548 n=5+5)
_invalidBody-2                 10.8 ±35%       8.7 ±14%     ~     (p=0.310 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%       639 ± 0%     ~     (all equal)
_directGzipHead-2               183 ± 0%       183 ± 0%     ~     (all equal)
_noDirectGzip-2               1.04k ± 0%     1.04k ± 0%     ~     (all equal)
_directGzip_decode-2            639 ± 0%       639 ± 0%     ~     (all equal)
_noDirectGzip_decode-2        1.04k ± 0%     1.04k ± 0%     ~     (all equal)
_jsonBody-2                     208 ± 0%       208 ± 0%     ~     (all equal)
_jsonBodyValidation-2           194 ± 0%       194 ± 0%     ~     (all equal)
_outputHeaders-2                155 ± 0%       155 ± 0%     ~     (all equal)
_requestResponseMapping-2      94.0 ± 0%      94.0 ± 0%     ~     (all equal)
_validation-2                   177 ± 0%       177 ± 0%     ~     (all equal)
_noValidation-2                 177 ± 0%       177 ± 0%     ~     (all equal)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                   653 ± 0%       653 ± 0%     ~     (all equal)
_directGzipHead-2               197 ± 0%       197 ± 0%     ~     (all equal)
_noDirectGzip-2               1.06k ± 0%     1.06k ± 0%     ~     (all equal)
_directGzip_decode-2            653 ± 0%       653 ± 0%     ~     (all equal)
_noDirectGzip_decode-2        1.06k ± 0%     1.06k ± 0%     ~     (all equal)
_htmlResponse-2                 370 ± 0%       370 ± 0%     ~     (all equal)
_jsonBodyManual-2               222 ± 0%       222 ± 0%     ~     (all equal)
_jsonBody-2                     222 ± 0%       222 ± 0%     ~     (all equal)
_jsonBodyValidation-2           208 ± 0%       208 ± 0%     ~     (all equal)
_outputHeaders-2                169 ± 0%       169 ± 0%     ~     (all equal)
_requestResponseMapping-2       108 ± 0%       108 ± 0%     ~     (all equal)
_validation-2                   191 ± 0%       191 ± 0%     ~     (all equal)
_noValidation-2                 191 ± 0%       191 ± 0%     ~     (all equal)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2                  337 ± 0%       337 ± 0%     ~     (all equal)
_ok-2                           359 ± 0%       359 ± 0%     ~     (all equal)
_invalidBody-2                  435 ± 0%       435 ± 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                 42.5k ±12%     43.3k ± 3%     ~     (p=0.421 n=5+5)
_directGzipHead-2             45.9k ± 3%     44.8k ± 4%     ~     (p=0.222 n=5+5)
_noDirectGzip-2               8.29k ± 1%     8.26k ± 2%     ~     (p=0.690 n=5+5)
_directGzip_decode-2          2.35k ± 3%     2.38k ± 2%     ~     (p=0.421 n=5+5)
_noDirectGzip_decode-2        7.88k ± 1%     8.30k ± 1%   +5.37%  (p=0.008 n=5+5)
_jsonBody-2                   24.4k ± 1%     25.1k ± 3%   +2.95%  (p=0.032 n=5+5)
_jsonBodyValidation-2         20.7k ± 3%     22.1k ± 1%   +6.92%  (p=0.008 n=5+5)
_outputHeaders-2              43.9k ± 1%     47.5k ± 2%   +8.37%  (p=0.008 n=5+5)
_requestResponseMapping-2     24.0k ± 2%     25.8k ± 2%   +7.35%  (p=0.008 n=5+5)
_validation-2                 22.9k ± 1%     23.9k ± 4%     ~     (p=0.056 n=5+5)
_noValidation-2               30.6k ± 2%     31.3k ± 4%     ~     (p=0.222 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                 41.2k ± 2%     45.6k ± 1%  +10.58%  (p=0.016 n=5+4)
_directGzipHead-2             42.9k ± 2%     45.2k ± 3%   +5.34%  (p=0.008 n=5+5)
_noDirectGzip-2               7.69k ± 1%     8.28k ± 1%   +7.62%  (p=0.008 n=5+5)
_directGzip_decode-2          2.06k ± 4%     2.31k ± 4%  +12.24%  (p=0.008 n=5+5)
_noDirectGzip_decode-2        7.38k ± 1%     7.46k ± 4%     ~     (p=1.000 n=5+5)
_htmlResponse-2               27.7k ± 0%     26.9k ± 4%   -3.11%  (p=0.016 n=4+5)
_jsonBodyManual-2             37.4k ± 1%     37.4k ± 1%     ~     (p=0.841 n=5+5)
_jsonBody-2                   26.3k ± 1%     24.8k ± 7%     ~     (p=0.095 n=5+5)
_jsonBodyValidation-2         20.6k ± 2%     19.7k ± 3%   -4.37%  (p=0.016 n=5+5)
_outputHeaders-2              44.0k ± 1%     42.8k ± 3%     ~     (p=0.151 n=5+5)
_requestResponseMapping-2     22.8k ± 8%     23.7k ± 3%     ~     (p=0.222 n=5+5)
_validation-2                 23.1k ± 7%     22.1k ± 4%     ~     (p=0.095 n=5+5)
_noValidation-2               32.2k ± 2%     30.7k ± 1%   -4.60%  (p=0.008 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2                38.6k ±11%     38.5k ± 2%     ~     (p=0.222 n=5+5)
_ok-2                         40.1k ± 1%     37.1k ±11%   -7.29%  (p=0.008 n=5+5)
_invalidBody-2                27.4k ± 5%     26.7k ± 3%     ~     (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.92kB ± 0%    3.92kB ± 0%     ~     (p=0.286 n=5+5)
_directGzipHead-2            3.92kB ± 0%    3.92kB ± 0%     ~     (p=0.365 n=5+5)
_noDirectGzip-2              6.54kB ±22%    6.87kB ±20%     ~     (p=0.841 n=5+5)
_directGzip_decode-2          403kB ± 0%     403kB ± 0%     ~     (p=0.310 n=5+5)
_noDirectGzip_decode-2       5.72kB ± 8%    5.79kB ± 5%     ~     (p=0.690 n=5+5)
_jsonBody-2                  13.2kB ± 0%    13.2kB ± 0%     ~     (p=0.286 n=5+5)
_jsonBodyValidation-2        19.0kB ± 0%    19.0kB ± 0%     ~     (p=0.063 n=5+5)
_outputHeaders-2             3.71kB ± 0%    3.71kB ± 0%     ~     (p=0.873 n=5+5)
_requestResponseMapping-2    16.7kB ± 0%    16.7kB ± 0%     ~     (p=0.516 n=5+5)
_validation-2                16.6kB ± 0%    16.6kB ± 0%     ~     (p=0.103 n=5+5)
_noValidation-2              7.89kB ± 0%    7.89kB ± 0%     ~     (p=0.222 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64
_directGzip-2                3.97kB ± 0%    3.97kB ± 0%     ~     (p=0.333 n=5+5)
_directGzipHead-2            3.97kB ± 0%    3.97kB ± 0%     ~     (p=0.992 n=5+5)
_noDirectGzip-2              6.86kB ±21%    6.89kB ±10%     ~     (p=1.000 n=5+5)
_directGzip_decode-2          403kB ± 0%     403kB ± 0%     ~     (p=0.222 n=5+5)
_noDirectGzip_decode-2       5.99kB ± 8%    5.77kB ± 9%     ~     (p=0.310 n=5+5)
_htmlResponse-2              8.25kB ± 0%    8.25kB ± 0%     ~     (p=0.889 n=5+5)
_jsonBodyManual-2            4.65kB ± 0%    4.65kB ± 0%     ~     (p=0.556 n=5+4)
_jsonBody-2                  10.4kB ± 0%    10.4kB ± 0%     ~     (p=0.063 n=5+5)
_jsonBodyValidation-2        19.1kB ± 0%    19.1kB ± 0%     ~     (p=0.857 n=5+5)
_outputHeaders-2             3.74kB ± 0%    3.74kB ± 0%     ~     (p=0.365 n=5+5)
_requestResponseMapping-2    16.8kB ± 0%    16.8kB ± 0%     ~     (p=0.984 n=5+5)
_validation-2                16.7kB ± 0%    16.7kB ± 0%     ~     (p=0.683 n=5+5)
_noValidation-2              7.95kB ± 0%    7.95kB ± 0%     ~     (p=0.143 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-2               4.88kB ± 0%    4.89kB ± 0%     ~     (p=0.167 n=5+5)
_ok-2                        4.79kB ± 0%    4.79kB ± 0%     ~     (p=0.743 n=4+4)
_invalidBody-2               8.63kB ± 0%    8.63kB ± 0%     ~     (p=0.343 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%       501 ± 0%     ~     (p=0.484 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%       503 ± 0%   -0.20%  (p=0.016 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)

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.

uuid.UUID howto
1 participant