8000 Update CI by vearutop · Pull Request #231 · swaggest/rest · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update CI #231

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

Merged
merged 2 commits into from
Jun 9, 2025
Merged

Update CI #231

merged 2 commits into from
Jun 9, 2025

Conversation

vearutop
Copy link
Member
@vearutop vearutop commented Jun 9, 2025

No description provided.

Copy link
github-actions bot commented Jun 9, 2025

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
YAML 10 670 (+1) 576 46 (+1) 48 0 20.5K (+227B)

Copy link
github-actions bot commented Jun 9, 2025

Go API Changes

# summary
Inferred base version: v0.2.74
Suggested version: v0.2.75

Copy link
github-actions bot commented Jun 9, 2025

Unit Test Coverage

total: (statements) 80.6%

Coverage of changed lines

No changes in testable statements.

Coverage diff with base branch

No changes in coverage.

Copy link
github-actions bot commented Jun 9, 2025

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.14µs ± 6%    1.13µs ± 0%    ~     (p=0.683 n=5+5)
pkg:github.com/swaggest/rest/request goos:linux goarch:amd64
Decoder_Decode-4                           586ns ± 4%     578ns ± 1%    ~     (p=0.579 n=5+5)
DecoderFunc_Decode-4                      1.65µs ± 1%    1.66µs ± 4%    ~     (p=0.595 n=5+5)
Decoder_Decode_json-4               
8000
      18.9µs ± 1%    19.0µs ± 2%    ~     (p=1.000 n=5+5)
Decoder_Decode_queryObject-4              4.02µs ± 1%    4.03µs ± 1%    ~     (p=0.413 n=5+5)
Decoder_Decode_jsonParam-4                1.56µs ± 1%    1.56µs ± 1%    ~     (p=1.000 n=5+5)
DecoderFactory_SetDecoderFunc-4           1.37µs ± 1%    1.38µs ± 1%  +1.07%  (p=0.048 n=5+5)
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-4                              11.4µs ± 1%    11.6µs ± 1%  +1.93%  (p=0.008 n=5+5)
Middleware_control-4                      2.73µs ± 2%    2.75µs ± 3%    ~     (p=0.310 n=5+5)

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%    ~     (p=0.095 n=5+4)
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.17kB ± 2%    1.19kB ± 3%    ~     (p=0.206 n=5+5)
Middleware_control-4                      11.1kB ± 0%    11.1kB ± 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                        8.00 ± 0%      8.00 ± 0%    ~     (all equal)
Benchmark result
name                                    time/op
pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64
RequestValidator_ValidateRequestData-4  1.13µs ± 0%
pkg:github.com/swaggest/rest/request goos:linux goarch:amd64
Decoder_Decode-4                         578ns ± 1%
DecoderFunc_Decode-4                    1.66µs ± 4%
Decoder_Decode_json-4                   19.0µs ± 2%
Decoder_Decode_queryObject-4            4.03µs ± 1%
Decoder_Decode_jsonParam-4              1.56µs ± 1%
DecoderFactory_SetDecoderFunc-4         1.38µs ± 1%
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-4                            11.6µs ± 1%
Middleware_control-4                    2.75µs ± 3%

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.19kB ± 3%
Middleware_control-4                    11.1kB ± 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                      8.00 ± 0%

Copy link
@llamapreview llamapreview bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto Pull Request Review from LlamaPReview

1. Overview

1.1 Core Changes

  • Primary purpose and scope: Update CI workflows and dependencies to improve test coverage reporting
  • Key components modified: .github/workflows/test-unit.yml, go.mod, go.sum
  • Cross-component impacts: Changes in CI workflow may affect how test coverage is reported and analyzed
  • Business value alignment: Enhances development workflow quality and maintainability

1.2 Technical Architecture

  • System design modifications: Replaces Git operations with direct GitHub API access for PR diff retrieval
  • Component interaction changes: CI workflow now depends on GitHub API for diff data
  • Integration points impact: Introduces new dependency on GitHub API
  • Dependency changes and implications: Updates github.com/bool64/dev to v0.2.40

2. Critical Findings

2.1 Must Fix (P0🔴)

Issue: Missing error handling in API request

  • Analysis Confidence: High
  • Impact: Silent failures may cause invalid coverage reports
  • Resolution: Add robust error handling for the curl command

2.2 Should Fix (P1🟡)

Issue: Missing temporary file cleanup

  • Analysis Confidence: High
  • Impact: Potential workspace pollution in CI runners
  • Suggested Solution: Add cleanup mechanism for pull_request.diff

Issue: Hardcoded API version

  • Analysis Confidence: Medium
  • Impact: Difficult migration to future GitHub API versions
  • Suggested Solution: Make API version configurable

2.3 Consider (P2🟢)

Area: Parallel processing optimization

  • Analysis Confidence: Medium
  • Improvement Opportunity: Run coverage analysis while downloading diff to improve efficiency

Area: Output validation

  • Analysis Confidence: Low
  • Improvement Opportunity: Add basic sanity check for diff file

2.4 Summary of Action Items

  1. Add error handling for the curl command (P0)
  2. Implement temporary file cleanup (P1)
  3. Make API version configurable (P1)
  4. Consider parallel processing optimization (P2)
  5. Consider adding output validation (P2)

3. Technical Analysis

3.1 Code Logic Analysis

📁 .github/workflows/test-unit.yml - Annotate missing test coverage

  • Submitted PR Code:
    - name: Annotate missing test coverage
      id: annotate
      if: matrix.go-version == env.COV_GO_VERSION && github.event.pull_request.base.sha != ''
      run: |
        curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.4.2/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz
        gocovdiff_hash=$(git hash-object ./gocovdiff)
        [ "$gocovdiff_hash" == "c37862c73a677e5a9c069470287823ab5bbf0244" ] || (echo "::error::unexpected hash for gocovdiff, possible tampering: $gocovdiff_hash" && exit 1)
-       git fetch origin master ${{ github.event.pull_request.base.sha }}
-       REP=$(./gocovdiff -mod github.com/$GITHUB_REPOSITORY -cov unit.coverprofile -gha-annotations gha-unit.txt -delta-cov-file delta-cov-unit.txt -target-delta-cov ${TARGET_DELTA_COV})
+       # Fetch PR diff from GitHub API.
+       curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3.diff" https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} > pull_request.diff
+       REP=$(./gocovdiff -diff pull_request.diff -mod github.com/$GITHUB_REPOSITORY -cov unit.coverprofile -gha-annotations gha-unit.txt -delta-cov-file delta-cov-unit.txt -target-delta-cov ${TARGET_DELTA_COV})
  • Analysis:
    • Current logic replaces Git operations with direct GitHub API access
    • Avoids potential shallow clone issues
    • Reduces dependency on local Git state
    • Introduces new failure mode (API request failures)
  • LlamaPReview Suggested Improvements:
    - name: Annotate missing test coverage
      id: annotate
      if: matrix.go-version == env.COV_GO_VERSION && github.event.pull_request.base.sha != ''
      run: |
        curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.4.2/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz
        gocovdiff_hash=$(git hash-object ./gocovdiff)
        [ "$gocovdiff_hash" == "c37862c73a677e5a9c069470287823ab5bbf0244" ] || (echo "::error::unexpected hash for gocovdiff, possible tampering: $gocovdiff_hash" && exit 1)
        if ! curl -f -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3.diff" https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} > pull_request.diff; then
          echo "::error::Failed to download PR diff"
          exit 1
        fi
        trap 'rm -f pull_request.diff' EXIT
        REP=$(./gocovdiff -diff pull_request.diff -mod github.com/$GITHUB_REPOSITORY -cov unit.coverprofile -gha-annotations gha-unit.txt -delta-cov-file delta-cov-unit.txt -target-delta-cov ${TARGET_DELTA_COV})
  • Improvement rationale:
    • Technical benefits: Prevents silent failures and workspace pollution
    • Business value: Ensures reliable coverage reports
    • Risk assessment: Low risk, high reward

3.2 Key Quality Aspects

  • System scalability considerations: The new approach is more scalable as it avoids Git history dependencies
  • Performance bottlenecks and optimizations: Consider parallel processing for efficiency
  • Testing strategy and coverage: Ensure negative test cases for API failures and empty diffs
  • Documentation needs: Update CI documentation to reflect the new workflow

4. Overall Evaluation

  • Technical assessment: The PR modernizes the CI workflow and reduces Git environment dependencies
  • Business impact: Enhances development workflow quality and maintainability
  • Risk evaluation: Low risk with proper error handling and cleanup
  • Notable positive aspects and good practices: Maintains security practices and keeps dependencies current
  • Implementation quality: Good, but requires critical error handling and cleanup
  • Final recommendation: Request Changes (address P0 issue and P1 suggestions)

💡 LlamaPReview Community
Have feedback on this AI Code review tool? Join our GitHub Discussions to share your thoughts and help shape the future of LlamaPReview.

Copy link
github-actions bot commented Jun 9, 2025

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.4µs ± 7%    16.8µs ± 1%   -3.72%  (p=0.032 n=5+4)
_directGzipHead-4            17.4µs ± 8%    16.6µs ± 1%   -4.30%  (p=0.008 n=5+5)
_noDirectGzip-4              94.2µs ± 1%    93.6µs ± 1%     ~     (p=0.222 n=5+5)
_directGzip_decode-4          320µs ± 1%     315µs ± 1%     ~     (p=0.056 n=5+5)
_noDirectGzip_decode-4       94.6µs ± 2%    94.8µs ± 2%     ~     (p=1.000 n=5+5)
_jsonBody-4                  35.7µs ± 1%    36.0µs ± 1%     ~     (p=0.095 n=5+5)
_jsonBodyValidation-4        40.4µs ± 0%    39.8µs ± 3%     ~     (p=0.421 n=5+5)
_outputHeaders-4             16.9µs ± 0%    16.7µs ± 0%   -0.69%  (p=0.008 n=5+5)
_requestResponseMapping-4    34.0µs ± 1%    34.1µs ± 6%     ~     (p=0.548 n=5+5)
_validation-4                37.0µs ± 3%    36.5µs ± 2%     ~     (p=0.222 n=5+5)
_noValidation-4              26.0µs ± 1%    26.3µs ± 3%     ~     (p=0.421 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4           19.7µs ± 1%    19.6µs ± 2%     ~     (p=0.286 n=4+5)
_formOrJSON/json-4           23.0µs ± 1%    23.0µs ± 1%     ~     (p=0.841 n=5+5)
_directGzip-4                16.9µs ± 1%    16.9µs ± 2%     ~     (p=0.548 n=5+5)
_directGzipHead-4            17.3µs ± 3%    17.4µs ± 3%     ~     (p=0.690 n=5+5)
_noDirectGzip-4               107µs ± 0%     107µs ± 1%     ~     (p=1.000 n=5+5)
_htmlResponse-4              30.5µs ± 2%    30.1µs ± 1%     ~     (p=0.056 n=5+5)
_jsonBodyManual-4            21.8µs ± 1%    21.2µs ± 2%   -2.69%  (p=0.016 n=5+5)
_jsonBody-4                  32.6µs ± 0%    31.8µs ± 1%   -2.74%  (p=0.008 n=5+5)
_jsonBodyValidation-4        41.1µs ± 2%    39.7µs ± 3%   -3.43%  (p=0.016 n=5+5)
_outputHeaders-4             29.8µs ± 1%    29.1µs ± 2%     ~     (p=0.056 n=5+5)
_requestResponseMapping-4    34.6µs ± 1%    33.8µs ± 3%   -2.15%  (p=0.032 n=5+5)
_validation-4                37.3µs ± 4%    36.3µs ± 1%   -2.59%  (p=0.016 n=5+5)
_noValidation-4              26.6µs ± 1%    25.9µs ± 2%   -2.83%  (p=0.008 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4               19.6µs ± 2%    19.5µs ± 1%     ~     (p=0.905 n=5+4)
_ok-4                        19.6µs ± 0%    19.6µs ± 1%     ~     (p=0.556 n=4+5)
_invalidBody-4               28.1µs ± 5%    28.5µs ± 3%     ~     (p=0.310 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 ± 6%      0.75 ± 5%     ~     (p=0.310 n=5+5)
_directGzipHead-4              0.75 ± 4%      0.71 ± 2%   -4.14%  (p=0.008 n=5+5)
_noDirectGzip-4                4.30 ± 1%      4.25 ± 3%     ~     (p=0.421 n=5+5)
_directGzip_decode-4           10.2 ± 9%       9.5 ±14%     ~     (p=0.421 n=5+5)
_noDirectGzip_decode-4         4.31 ± 6%      4.39 ± 6%     ~     (p=0.421 n=5+5)
_jsonBody-4                    1.48 ± 3%      1.50 ± 5%     ~     (p=0.690 n=5+5)
_jsonBodyValidation-4          1.66 ± 3%      1.65 ± 4%     ~     (p=0.794 n=5+5)
_outputHeaders-4               0.74 ± 7%      0.72 ± 4%     ~     (p=0.310 n=5+5)
_requestResponseMapping-4      1.39 ± 4%      1.38 ± 4%     ~     (p=0.690 n=5+5)
_validation-4                  1.50 ± 4%      1.54 ± 5%     ~     (p=0.095 n=5+5)
_noValidation-4                1.10 ± 7%      1.09 ± 4%     ~     (p=0.841 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             0.86 ± 6%      0.86 ± 5%     ~     (p=1.000 n=5+5)
_formOrJSON/json-4             0.99 ± 6%      0.97 ± 4%     ~     (p=0.690 n=5+5)
_directGzip-4                  0.72 ± 4%      0.74 ± 5%     ~     (p=0.056 n=5+5)
_directGzipHead-4              0.74 ± 6%      0.76 ± 6%     ~     (p=0.421 n=5+5)
_noDirectGzip-4                4.93 ± 9%      4.82 ± 3%     ~     (p=0.690 n=5+5)
_htmlResponse-4                1.25 ± 2%      1.27 ± 5%     ~     (p=0.690 n=5+5)
_jsonBodyManual-4              0.97 ± 4%      0.89 ± 3%   -8.05%  (p=0.008 n=5+5)
_jsonBody-4                    1.37 ± 4%      1.32 ± 3%     ~     (p=0.056 n=5+5)
_jsonBodyValidation-4          1.72 ± 5%      1.66 ± 7%     ~     (p=0.310 n=5+5)
_outputHeaders-4               1.25 ± 8%      1.17 ± 3%     ~     (p=0.095 n=5+5)
_requestResponseMapping-4      1.44 ± 4%      1.39 ± 2%   -3.91%  (p=0.032 n=5+5)
_validation-4                  1.51 ± 8%      1.48 ± 5%     ~     (p=0.421 n=5+5)
_noValidation-4                1.11 ± 5%      1.10 ± 5%     ~     (p=0.841 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 0.85 ± 6%      0.86 ±10%     ~     (p=0.841 n=5+5)
_ok-4                          0.86 ± 5%      0.86 ± 3%     ~     (p=1.000 n=5+5)
_invalidBody-4                 1.16 ± 7%      1.21 ± 7%     ~     (p=0.310 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.54 ± 5%      1.57 ±17%     ~     (p=0.690 n=5+5)
_directGzipHead-4              1.54 ± 7%      1.53 ± 4%     ~     (p=0.841 n=5+5)
_noDirectGzip-4                8.86 ± 5%      9.06 ± 8%     ~     (p=0.310 n=5+5)
_directGzip_decode-4           30.9 ± 3%      32.4 ± 9%     ~     (p=0.310 n=5+5)
_noDirectGzip_decode-4         8.98 ± 5%      9.10 ± 5%     ~     (p=1.000 n=5+5)
_jsonBody-4                    3.23 ± 3%      3.35 ± 3%     ~     (p=0.095 n=5+5)
_jsonBodyValidation-4          3.56 ± 4%      3.56 ± 2%     ~     (p=1.000 n=5+5)
_outputHeaders-4               1.50 ± 3%      1.52 ± 6%     ~     (p=0.881 n=5+5)
_requestResponseMapping-4      3.07 ± 7%      3.12 ± 4%     ~     (p=0.310 n=5+5)
_validation-4                  3.33 ± 4%      3.37 ± 2%     ~     (p=0.389 n=5+5)
_noValidation-4                2.38 ± 2%      2.41 ± 4%     ~     (p=0.548 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             1.80 ±11%      1.84 ± 3%     ~     (p=0.151 n=5+5)
_formOrJSON/json-4             2.17 ± 6%      2.12 ± 5%     ~     (p=0.310 n=5+5)
_directGzip-4                  1.50 ± 4%      1.53 ± 6%     ~     (p=0.690 n=5+5)
_directGzipHead-4              1.56 ± 5%      1.59 ± 5%     ~     (p=0.421 n=5+5)
_noDirectGzip-4                10.1 ± 5%      10.0 ± 3%     ~     (p=0.548 n=5+5)
_htmlResponse-4                2.91 ± 4%      2.78 ± 2%   -4.49%  (p=0.016 n=5+5)
_jsonBodyManual-4              1.98 ± 4%      1.92 ± 7%     ~     (p=0.222 n=5+5)
_jsonBody-4                    3.04 ± 3%      2.96 ± 5%     ~     (p=0.310 n=5+5)
_jsonBodyValidation-4          3.75 ± 2%      3.59 ± 5%   -4.16%  (p=0.008 n=5+5)
_outputHeaders-4               2.85 ± 4%      2.77 ± 6%     ~     (p=0.548 n=5+5)
_requestResponseMapping-4      3.24 ± 5%      3.08 ± 3%     ~     (p=0.056 n=5+5)
_validation-4                  3.48 ± 4%      3.34 ± 6%     ~     (p=0.151 n=5+5)
_noValidation-4                2.51 ± 4%      2.40 ± 5%     ~     (p=0.056 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 1.74 ± 3%      1.80 ±15%     ~     (p=0.841 n=5+5)
_ok-4                          1.79 ± 5%      1.81 ± 4%     ~     (p=0.548 n=5+5)
_invalidBody-4                 2.67 ±10%      2.76 ± 8%     ~     (p=0.135 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.78 ±30%      2.76 ±46%     ~     (p=0.421 n=5+5)
_directGzipHead-4              2.97 ±46%      2.44 ± 3%  -17.93%  (p=0.032 n=5+5)
_noDirectGzip-4                13.4 ± 3%      13.5 ± 5%     ~     (p=0.690 n=5+5)
_directGzip_decode-4           59.2 ± 7%      60.9 ±16%     ~     (p=0.841 n=5+5)
_noDirectGzip_decode-4         14.0 ± 3%      13.9 ±13%     ~     (p=0.421 n=5+5)
_jsonBody-4                    5.11 ± 3%      5.22 ± 8%     ~     (p=0.310 n=5+5)
_jsonBodyValidation-4          6.11 ± 9%      5.89 ± 8%     ~     (p=0.310 n=5+5)
_outputHeaders-4               2.62 ± 6%      2.54 ± 6%     ~     (p=0.222 n=5+5)
_requestResponseMapping-4      4.80 ± 5%      5.25 ±14%     ~     (p=0.056 n=5+5)
_validation-4                  5.57 ±11%      5.54 ± 9%     ~     (p=0.841 n=5+5)
_noValidation-4                3.99 ± 2%      4.10 ±16%     ~     (p=0.841 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             3.19 ±41%      2.85 ± 4%     ~     (p=0.690 n=5+5)
_formOrJSON/json-4             3.42 ± 4%      3.40 ± 2%     ~     (p=0.690 n=5+5)
_directGzip-4                  2.56 ± 3%      2.49 ± 7%     ~     (p=0.548 n=5+5)
_directGzipHead-4              2.67 ± 4%      2.58 ± 7%     ~     (p=0.310 n=5+5)
_noDirectGzip-4                15.6 ± 6%      16.0 ± 6%     ~     (p=0.508 n=5+5)
_htmlResponse-4                4.62 ± 9%      4.59 ± 4%     ~     (p=1.000 n=5+5)
_jsonBodyManual-4              3.26 ± 2%      3.20 ± 3%     ~     (p=0.151 n=5+5)
_jsonBody-4                    4.72 ± 4%      4.62 ± 3%     ~     (p=0.310 n=5+5)
_jsonBodyValidation-4          5.89 ± 6%      5.44 ± 3%   -7.77%  (p=0.008 n=5+5)
_outputHeaders-4               4.49 ± 5%      4.36 ± 5%     ~     (p=0.151 n=5+5)
_requestResponseMapping-4      4.88 ± 4%      4.75 ± 3%     ~     (p=0.548 n=5+5)
_validation-4                  5.38 ± 7%      5.16 ± 4%     ~     (p=0.095 n=5+5)
_noValidation-4                4.16 ± 7%      3.94 ± 3%     ~     (p=0.095 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 2.77 ± 5%      2.76 ± 3%     ~     (p=0.556 n=5+4)
_ok-4                          3.16 ±41%      2.79 ± 5%     ~     (p=0.548 n=5+5)
_invalidBody-4                 4.46 ± 7%      4.71 ± 9%     ~     (p=0.151 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.55 ±39%      4.27 ±75%     ~     (p=0.421 n=5+5)
_directGzipHead-4              5.16 ±44%      4.02 ±20%     ~     (p=0.151 n=5+5)
_noDirectGzip-4                17.6 ±15%      18.2 ±11%     ~     (p=0.841 n=5+5)
_directGzip_decode-4           85.5 ±18%      89.9 ±26%     ~     (p=1.000 n=5+5)
_noDirectGzip_decode-4         19.1 ±16%      19.0 ±24%     ~     (p=0.548 n=5+5)
_jsonBody-4                    7.26 ± 0%      7.58 ±13%     ~     (p=0.190 n=4+5)
_jsonBodyValidation-4          9.01 ±13%      8.09 ±10%     ~     (p=0.222 n=5+5)
_outputHeaders-4               4.47 ±11%      4.27 ± 8%     ~     (p=0.421 n=5+5)
_requestResponseMapping-4      7.13 ± 8%      7.43 ±18%     ~     (p=1.000 n=5+5)
_validation-4                  8.23 ±25%      7.77 ± 6%     ~     (p=0.690 n=5+5)
_noValidation-4                5.84 ± 6%      6.13 ±26%     ~     (p=1.000 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             4.54 ±57%      4.00 ±10%     ~     (p=1.000 n=5+5)
_formOrJSON/json-4             4.95 ±14%      4.56 ± 3%     ~     (p=0.222 n=5+5)
_directGzip-4                  3.89 ±10%      3.87 ± 9%     ~     (p=0.690 n=5+5)
_directGzipHead-4              4.16 ±24%      4.23 ±22%     ~     (p=1.000 n=5+5)
_noDirectGzip-4                20.4 ±23%      22.6 ± 9%     ~     (p=0.222 n=5+5)
_htmlResponse-4                6.60 ±16%      6.75 ± 8%     ~     (p=0.841 n=5+5)
_jsonBodyManual-4              5.10 ±11%      4.95 ± 9%     ~     (p=0.690 n=5+5)
_jsonBody-4                    6.61 ± 5%      6.36 ± 8%     ~     (p=0.222 n=5+5)
_jsonBodyValidation-4          8.70 ± 8%      7.70 ± 9%  -11.57%  (p=0.032 n=5+5)
_outputHeaders-4               6.48 ±13%      6.25 ± 5%     ~     (p=0.548 n=5+5)
_requestResponseMapping-4      6.84 ±10%      7.22 ±14%     ~     (p=0.095 n=5+5)
_validation-4                  7.96 ± 8%      7.61 ± 7%     ~     (p=0.310 n=5+5)
_noValidation-4                5.89 ±11%      5.68 ±11%     ~     (p=0.421 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 3.69 ± 2%      4.67 ±61%     ~     (p=0.111 n=4+5)
_ok-4                          3.86 ± 7%      3.78 ±15%     ~     (p=0.413 n=4+5)
_invalidBody-4                 6.39 ±17%      6.45 ± 6%     ~     (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-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
_formOrJSON/form-4              155 ± 0%       155 ± 0%     ~     (all equal)
_formOrJSON/json-4              156 ± 0%       156 ± 0%     ~     (all equal)
_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)
_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
_formOrJSON/form-4              170 ± 0%       170 ± 0%     ~     (all equal)
_formOrJSON/json-4              162 ± 0%       162 ± 0%     ~     (all equal)
_directGzip-4                   103 ± 0%       103 ± 0%     ~     (all equal)
_directGzipHead-4               104 ± 0%       104 ± 0%     ~     (all equal)
_noDirectGzip-4                 117 ± 0%       117 ± 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.5k ± 6%     59.7k ± 1%   +3.74%  (p=0.032 n=5+4)
_directGzipHead-4             57.7k ± 8%     60.2k ± 1%   +4.31%  (p=0.008 n=5+5)
_noDirectGzip-4               10.6k ± 1%     10.7k ± 1%     ~     (p=0.222 n=5+5)
_directGzip_decode-4          3.13k ± 1%     3.17k ± 1%     ~     (p=0.056 n=5+5)
_noDirectGzip_decode-4        10.6k ± 2%     10.6k ± 2%     ~     (p=1.000 n=5+5)
_jsonBody-4                   28.0k ± 1%     27.7k ± 1%     ~     (p=0.095 n=5+5)
_jsonBodyValidation-4         24.7k ± 0%     25.1k ± 3%     ~     (p=0.421 n=5+5)
_outputHeaders-4              59.3k ± 0%     59.7k ± 0%   +0.69%  (p=0.008 n=5+5)
_requestResponseMapping-4     29.4k ± 1%     29.3k ± 5%     ~     (p=0.548 n=5+5)
_validation-4                 27.0k ± 3%     27.4k ± 2%     ~     (p=0.222 n=5+5)
_noValidation-4               38.5k ± 1%     38.0k ± 3%     ~     (p=0.421 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4            50.8k ± 1%     51.1k ± 2%     ~     (p=0.286 n=4+5)
_formOrJSON/json-4            43.5k ± 1%     43.5k ± 1%     ~     (p=0.841 n=5+5)
_directGzip-4                 59.2k ± 1%     59.2k ± 2%     ~     (p=0.548 n=5+5)
_directGzipHead-4             58.0k ± 3%     57.5k ± 3%     ~     (p=0.690 n=5+5)
_noDirectGzip-4               9.37k ± 0%     9.36k ± 1%     ~     (p=1.000 n=5+5)
_htmlResponse-4               32.8k ± 2%     33.2k ± 1%     ~     (p=0.056 n=5+5)
_jsonBodyManual-4             45.9k ± 1%     47.1k ± 2%   +2.76%  (p=0.016 n=5+5)
_jsonBody-4                   30.6k ± 0%     31.5k ± 1%   +2.83%  (p=0.008 n=5+5)
_jsonBodyValidation-4         24.3k ± 2%     25.2k ± 3%   +3.57%  (p=0.016 n=5+5)
_outputHeaders-4              33.6k ± 1%     34.3k ± 2%     ~     (p=0.056 n=5+5)
_requestResponseMapping-4     28.9k ± 1%     29.6k ± 3%   +2.21%  (p=0.032 n=5+5)
_validation-4                 26.8k ± 3%     27.5k ± 1%   +2.63%  (p=0.016 n=5+5)
_noValidation-4               37.6k ± 1%     38.7k ± 2%   +2.93%  (p=0.008 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                51.0k ± 2%     51.1k ± 1%     ~     (p=0.905 n=5+4)
_ok-4                         50.9k ± 0%     51.1k ± 1%     ~     (p=0.413 n=4+5)
_invalidBody-4                35.6k ± 5%     35.2k ± 3%     ~     (p=0.310 n=5+5)

name                       old alloc/op   new alloc/op   delta
pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64
_directGzip-4                4.04kB ± 0%    4.04kB ± 0%     ~     (p=0.754 n=5+5)
_directGzipHead-4            4.04kB ± 0%    4.04kB ± 0%     ~     (p=0.206 n=5+5)
_noDirectGzip-4              7.23kB ±24%    7.56kB ±21%     ~     (p=0.690 n=5+5)
_directGzip_decode-4          399kB ± 0%     398kB ± 0%     ~     (p=0.310 n=5+5)
_noDirectGzip_decode-4       6.60kB ±15%    6.62kB ± 6%     ~     (p=1.000 n=5+5)
_jsonBody-4                  13.7kB ± 0%    13.7kB ± 0%     ~     (p=0.667 n=5+5)
_jsonBodyValidation-4        19.3kB ± 0%    19.3kB ± 0%     ~     (p=0.849 n=5+5)
_outputHeaders-4             3.71kB ± 0%    3.71kB ± 0%     ~     (p=1.000 n=5+5)
_requestResponseMapping-4    16.7kB ± 0%    16.7kB ± 0%     ~     (p=0.651 n=5+5)
_validation-4                16.6kB ± 0%    16.6kB ± 0%     ~     (p=0.794 n=5+4)
_noValidation-4              7.92kB ± 0%    7.92kB ± 0%   +0.10%  (p=0.040 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4           6.25kB ± 0%    6.25kB ± 0%     ~     (p=1.000 n=5+5)
_formOrJSON/json-4           6.63kB ± 0%    6.63kB ± 0%     ~     (p=0.833 n=5+5)
_directGzip-4                4.05kB ± 0%    4.05kB ± 0%     ~     (p=0.171 n=4+4)
_directGzipHead-4            4.05kB ± 0%    4.05kB ± 0%     ~     (p=0.492 n=5+5)
_noDirectGzip-4              7.64kB ±20%    8.21kB ±14%     ~     (p=0.222 n=5+5)
_htmlResponse-4              8.61kB ± 0%    8.61kB ± 0%     ~     (p=0.389 n=5+5)
_jsonBodyManual-4            4.99kB ± 0%    4.99kB ± 0%     ~     (p=0.143 n=5+4)
_jsonBody-4                  10.8kB ± 0%    10.8kB ± 0%     ~     (p=0.460 n=5+5)
_jsonBodyValidation-4        19.3kB ± 0%    19.3kB ± 0%     ~     (p=0.421 n=5+5)
_outputHeaders-4             10.4kB ± 0%    10.4kB ± 0%     ~     (p=0.984 n=5+5)
_requestResponseMapping-4    16.7kB ± 0%    16.7kB ± 0%     ~     (p=0.730 n=5+5)
_validation-4                16.6kB ± 0%    16.6kB ± 0%   +0.15%  (p=0.008 n=5+5)
_noValidation-4              7.95kB ± 0%    7.95kB ± 0%     ~     (p=0.754 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4               5.31kB ± 0%    5.31kB ± 0%     ~     (p=1.000 n=5+5)
_ok-4                        5.22kB ± 0%    5.22kB ± 0%     ~     (p=0.486 n=4+4)
_invalidBody-4               8.92kB ± 0%    8.92kB ± 0%     ~     (p=1.000 n=4+4)

name                       old allocs/op  new allocs/op  delta
pkg:github.com/swaggest/rest/_examples/advanced 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=0.651 n=5+4)
_noDirectGzip_decode-4         51.0 ± 0%      51.0 ± 0%     ~     (all equal)
_jsonBody-4                     131 ± 0%       131 ± 0%     ~     (all equal)
_jsonBodyValidation-4           184 ± 0%       184 ± 0%     ~     (all equal)
_outputHeaders-4               36.0 ± 0%      36.0 ± 0%     ~     (all equal)
_requestResponseMapping-4       122 ± 0%       122 ± 0%     ~     (all equal)
_validation-4                   153 ± 0%       153 ± 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
_formOrJSON/form-4             60.0 ± 0%      60.0 ± 0%     ~     (all equal)
_formOrJSON/json-4             66.0 ± 0%      66.0 ± 0%     ~     (all equal)
_directGzip-4                  44.0 ± 0%      44.0 ± 0%     ~     (all equal)
_directGzipHead-4              44.0 ± 0%      44.0 ± 0%     ~     (all equal)
_noDirectGzip-4                51.2 ± 4%      51.2 ± 4%     ~     (p=1.000 n=5+5)
_htmlResponse-4                 143 ± 0%       143 ± 0%     ~     (all equal)
_jsonBodyManual-4              50.0 ± 0%      50.0 ± 0%     ~     (all equal)
_jsonBody-4                     101 ± 0%       101 ± 0%     ~     (all equal)
_jsonBodyValidation-4           185 ± 0%       185 ± 0%     ~     (all equal)
_outputHeaders-4                110 ± 0%       110 ± 0%     ~     (all equal)
_requestResponseMapping-4       123 ± 0%       123 ± 0%     ~     (all equal)
_validation-4                   153 ± 0%       154 ± 0%     ~     (p=0.238 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                 98.0 ± 0%      98.0 ± 0%     ~     (all equal)

@vearutop vearutop merged commit dbcfb54 into master Jun 9, 2025
9 checks passed
@vearutop vearutop deleted the update-ci-2 branch June 9, 2025 23:51
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
0