Skip to content

[DO NOT MERGE] Test go canonicalizer#242

Open
vearutop wants to merge 15 commits intomasterfrom
gocan
Open

[DO NOT MERGE] Test go canonicalizer#242
vearutop wants to merge 15 commits intomasterfrom
gocan

Conversation

@vearutop
Copy link
Copy Markdown
Member

@vearutop vearutop commented Apr 6, 2026

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 115 9039 (+4) 6529 (+2) 675 (+2) 1835 1074 220.7K (+250B)
Go (test) 56 6945 5317 298 (+1) 1330 (-1) 197 (+1) 189.7K (+303B)
Markdown 7 642 485 0 157 0 21.2K (+6B)
YAML 11 (+1) 709 (+23) 616 (+20) 47 (+1) 46 (+2) 0 21.8K (+1.1K)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Go API Changes

# github.com/swaggest/rest/request
## incompatible changes
package removed

# github.com/swaggest/rest/requestaaaaaa
## compatible changes
package added

# github.com/swaggest/rest/requestaaaaaa/reqerr
## compatible changes
package added

# github.com/swaggest/rest/web
## incompatible changes
Service.DecoderFactory: changed from *github.com/swaggest/rest/request.DecoderFactory to *github.com/swaggest/rest/requestaaaaaa.DecoderFactory

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Unit Test Coverage

total: (statements) 80.6%
changed lines: (statements) 76.5%, coverage is less than 90.0%, consider testing the changes more thoroughly

Coverage of changed lines
File Function Coverage
Total 76.5%
chirouter/wrapper.go 100.0%
chirouter/wrapper.go:33 Connect 100.0%
chirouter/wrapper.go:38 Delete 100.0%
chirouter/wrapper.go:43 Get 100.0%
chirouter/wrapper.go:59 Handle 100.0%
chirouter/wrapper.go:68 HandlerFunc 100.0%
chirouter/wrapper.go:75 Head 100.0%
chirouter/wrapper.go:80 Method 100.0%
chirouter/wrapper.go:87 MethodFunc 100.0%
chirouter/wrapper.go:138 Route 100.0%
chirouter/wrapper.go:156 Use 100.0%
chirouter/wrapper.go:172 With 100.0%
chirouter/wrapper.go:195 Wrap 100.0%
chirouter/wrapper.go:203 copy 100.0%
chirouter/wrapper.go:213 handlersWithRoute 100.0%
chirouter/wrapper.go:217 handlerWraps 100.0%
chirouter/wrapper.go:230 resolvePattern 100.0%
error.go 50.0%
error.go:122 Unwrap 100.0%
error.go:113 Error 80.0%
error.go:154 Error 0.0%
error.go:159 HTTPStatus 0.0%
gorillamux/collector.go 100.0%
gorillamux/collector.go:15 NewOpenAPICollector 100.0%
gzip/container.go 86.2%
gzip/container.go:86 ETag 100.0%
gzip/container.go:96 JSONWriteTo 100.0%
gzip/container.go:120 PackJSON 100.0%
gzip/container.go:133 UnpackJSON 100.0%
gzip/container.go:15 MarshalJSON 94.3%
gzip/container.go:39 UnmarshalJSON 90.2%
jsonschema/validator.go 91.3%
jsonschema/validator.go:137 ForbidUnknownParams 100.0%
jsonschema/validator.go:238 checkRequired 100.0%
jsonschema/validator.go:213 ValidateJSONBody 90.7%
nethttp/handler.go 83.9%
nethttp/handler.go:15 HandlerWithRouteMiddleware 100.0%
nethttp/handler.go:112 SetRequestDecoder 100.0%
nethttp/handler.go:117 SetResponseEncoder 100.0%
nethttp/handler.go:124 SetUseCase 100.0%
nethttp/handler.go:132 UseCase 100.0%
nethttp/handler.go:171 handleErrResponseDefault 100.0%
nethttp/handler.go:255 RouteMethod 100.0%
nethttp/handler.go:259 RoutePattern 100.0%
nethttp/handler.go:161 handleErrResponse 90.9%
nethttp/handler.go:136 decodeRequest 87.5%
nethttp/handler.go:241 closeMultipartForm 0.0%
nethttp/openapi.go 54.5%
nethttp/openapi.go:39 APIKeySecurityMiddleware 100.0%
nethttp/openapi.go:87 OpenAPIAnnotationsMiddleware 100.0%
nethttp/openapi.go:114 OpenAPIMiddleware 93.2%
nethttp/openapi.go:15 AnnotateOpenAPI 0.0%
nethttp/openapi.go:158 SecurityMiddleware 0.0%
nethttp/options.go 81.8%
nethttp/options.go:40 OptionsMiddleware 100.0%
nethttp/options.go:124 SuccessfulResponseContentType 100.0%
nethttp/options.go:131 SuccessStatus 0.0%
nethttp/wrap.go 87.5%
nethttp/wrap.go:67 WrapHandler 97.1%
openapi/collector.go 69.7%
openapi/collector.go:345 SpecSchema 100.0%
openapi/collector.go:449 processUseCase 100.0%
openapi/collector.go:525 setupInput 100.0%
openapi/collector.go:588 setFieldMapping 100.0%
openapi/collector.go:282 ProvideResponseJSONSchemas 98.3%
openapi/collector.go:535 setupOutput 95.8%
openapi/collector.go:511 setOCJSONResponse 90.9%
openapi/collector.go:327 ServeHTTP 90.2%
openapi/collector.go:315 Reflector 87.5%
openapi/collector.go:253 ProvideRequestJSONSchemas 83.7%
openapi/collector.go:306 Refl 83.3%
openapi/collector.go:369 jsonSchemaCallback 83.3%
openapi/collector.go:349 combineOCErrors 61.1%
openapi/collector.go:21 NewCollector 0.0%
openapi/collector.go:90 Collect 0.0%
openapi/collector.go:244 HasAnnotation 0.0%
requestaaaaaa/decoder.go 66.7%
requestaaaaaa/decoder.go:115 cookiesToURLValues 100.0%
requestaaaaaa/decoder.go:157 headerToURLValues 100.0%
requestaaaaaa/decoder.go:161 queryToURLValues 100.0%
requestaaaaaa/decoder.go:53 makeDecoder 90.0%
requestaaaaaa/decoder.go:104 contentTypeBodyToURLValues 85.7%
requestaaaaaa/decoder.go:127 formDataToURLValues 76.9%
requestaaaaaa/decoder.go:20 Request 0.0%
requestaaaaaa/decoder.go:25 SetRequest 0.0%
requestaaaaaa/decoder.go:144 formToURLValues 0.0%
requestaaaaaa/factory.go 91.8%
requestaaaaaa/factory.go:144 SetDecoderFunc 100.0%
requestaaaaaa/factory.go:286 prepareCustomMapping 100.0%
requestaaaaaa/factory.go:342 initDecoder 100.0%
requestaaaaaa/factory.go:198 makeCustomMappingDecoder 97.1%
requestaaaaaa/factory.go:130 RegisterFunc 0.0%
requestaaaaaa/file.go 66.7%
requestaaaaaa/file.go:110 decodeFiles 100.0%
requestaaaaaa/file.go:55 setFile 0.0%
requestaaaaaa/jsonbody.go 100.0%
requestaaaaaa/jsonbody.go:22 decodeJSONBody 100.0%
requestaaaaaa/jsonbody.go:65 checkJSONBodyContentType 100.0%
requestaaaaaa/jsonbody.go:81 readJSON 100.0%
response/encoder.go 76.3%
response/encoder.go:34 ResponseWriter 100.0%
response/encoder.go:39 SetResponseWriter 100.0%
response/encoder.go:597 addressable 100.0%
response/encoder.go:95 SetupOutput 92.3%
response/encoder.go:63 MakeOutput 88.6%
response/encoder.go:648 setHeaders 88.2%
response/encoder.go:149 WriteErrResponse 87.8%
response/encoder.go:395 successStatus 85.7%
response/encoder.go:451 writeHeader 77.3%
response/encoder.go:349 setupHeadersEncoder 76.0%
response/encoder.go:441 writeError 62.5%
response/encoder.go:185 WriteSuccessfulResponse 46.7%
response/encoder.go:407 writeCookies 44.1%
response/gzip/middleware.go 74.4%
response/gzip/middleware.go:63 getBufWriter 100.0%
response/gzip/middleware.go:135 putBufWriter 100.0%
response/gzip/middleware.go:139 putGzipWriter 100.0%
response/gzip/middleware.go:207 Write 100.0%
response/gzip/middleware.go:219 WriteHeader 100.0%
response/gzip/middleware.go:154 Close 93.5%
response/gzip/middleware.go:179 Flush 73.3%
response/gzip/middleware.go:96 isTrivialNetworkError 0.0%
response/gzip/middleware.go:324 Hijack 0.0%
resttest/server.go 0.0%
resttest/server.go:10 NewServerMock 0.0%
trait.go 90.0%
trait.go:98 RestHandler 100.0%
trait.go:16 OutputHasNoContent 98.2%
validator.go 0.0%
validator.go:86 HasConstraints 0.0%
validator.go:91 ValidateData 0.0%
validator.go:96 ValidateJSONBody 0.0%
web/service.go 59.1%
web/service.go:46 NewService 100.0%
web/service.go:136 Docs 100.0%
web/service.go:171 OnMethodNotAllowed 100.0%
web/service.go:176 OnNotFound 100.0%
web/service.go:188 OpenAPISchema 100.0%
web/service.go:27 DefaultService 0.0%
web/service.go:181 OpenAPIReflector 0.0%
_examples/advanced-generic-openapi31/error_response.go no coverage
_examples/advanced-generic-openapi31/form_or_json.go no coverage
_examples/advanced-generic-openapi31/gzip_pass_through.go no coverage
_examples/advanced-generic-openapi31/html_response.go no coverage
_examples/advanced-generic-openapi31/json_body_manual.go no coverage
_examples/advanced-generic-openapi31/json_map_body.go no coverage
_examples/advanced-generic-openapi31/json_slice_body.go no coverage
_examples/advanced-generic-openapi31/request_text_body.go no coverage
_examples/advanced/dynamic_schema.go no coverage
_examples/advanced/error_response.go no coverage
_examples/advanced/gzip_pass_through.go no coverage
_examples/advanced/json_map_body.go no coverage
_examples/advanced/json_slice_body.go no coverage
_examples/gingonic/main.go no coverage
_examples/jwtauth/main.go no coverage
_examples/mount/main.go no coverage
_examples/multi-api/main.go no coverage
_examples/task-api/internal/domain/task/entity.go no coverage
_examples/task-api/internal/domain/task/service.go no coverage
_examples/task-api/internal/infra/repository/task.go no coverage
_examples/task-api/internal/infra/service/provider.go no coverage
_examples/task-api/internal/usecase/finish_task.go no coverage
_examples/task-api/internal/usecase/update_task.go no coverage
_examples/task-api/pkg/graceful/shutdown.go no coverage
requestaaaaaa/doc.go no coverage
requestaaaaaa/reqerr/error.go no coverage
route.go no coverage
Coverage diff with base branch
File Function Base Coverage Current Coverage
Total 80.6% 80.6% (0.0%)
error.go Error 66.7% 0.0% (-66.7%)
gzip/container.go MarshalJSON 83.3% 77.8% (-5.5%)
request/decoder.go Decode 100.0% no function
request/decoder.go Request 0.0% no function
request/decoder.go SetRequest 0.0% no function
request/decoder.go contentTypeBodyToURLValues 75.0% no function
request/decoder.go cookiesToURLValues 100.0% no function
request/decoder.go decodeValidate 73.3% no function
request/decoder.go formDataToURLValues 77.8% no function
request/decoder.go formToURLValues 0.0% no function
request/decoder.go headerToURLValues 100.0% no function
request/decoder.go makeDecoder 90.0% no function
request/decoder.go queryToURLValues 100.0% no function
request/factory.go MakeDecoder 96.3% no function
request/factory.go NewDecoderFactory 100.0% no function
request/factory.go RegisterFunc 0.0% no function
request/factory.go SetDecoderFunc 100.0% no function
request/factory.go initDecoder 100.0% no function
request/factory.go jsonParams 85.7% no function
request/factory.go makeCustomMappingDecoder 94.1% no function
request/factory.go makeDefaultDecoder 93.3% no function
request/factory.go prepareCustomMapping 100.0% no function
request/file.go decodeFiles 100.0% no function
request/file.go decodeFilesInStruct 81.2% no function
request/file.go setFile 86.2% no function
request/jsonbody.go checkJSONBodyContentType 100.0% no function
request/jsonbody.go decodeJSONBody 100.0% no function
request/jsonbody.go readJSON 100.0% no function
request/middleware.go Decode 0.0% no function
request/middleware.go DecoderMiddleware 94.1% no function
request/middleware.go ValidatorMiddleware 88.9% no function
request/reflect.go hasFileFields 100.0% no function
requestaaaaaa/decoder.go Decode no function 100.0%
requestaaaaaa/decoder.go Request no function 0.0%
requestaaaaaa/decoder.go SetRequest no function 0.0%
requestaaaaaa/decoder.go contentTypeBodyToURLValues no function 75.0%
requestaaaaaa/decoder.go cookiesToURLValues no function 100.0%
requestaaaaaa/decoder.go decodeValidate no function 73.3%
requestaaaaaa/decoder.go formDataToURLValues no function 77.8%
requestaaaaaa/decoder.go formToURLValues no function 0.0%
requestaaaaaa/decoder.go headerToURLValues no function 100.0%
requestaaaaaa/decoder.go makeDecoder no function 90.0%
requestaaaaaa/decoder.go queryToURLValues no function 100.0%
requestaaaaaa/factory.go MakeDecoder no function 96.3%
requestaaaaaa/factory.go NewDecoderFactory no function 100.0%
requestaaaaaa/factory.go RegisterFunc no function 0.0%
requestaaaaaa/factory.go SetDecoderFunc no function 100.0%
requestaaaaaa/factory.go initDecoder no function 100.0%
requestaaaaaa/factory.go jsonParams no function 85.7%
requestaaaaaa/factory.go makeCustomMappingDecoder no function 94.1%
requestaaaaaa/factory.go makeDefaultDecoder no function 93.3%
requestaaaaaa/factory.go prepareCustomMapping no function 100.0%
requestaaaaaa/file.go decodeFiles no function 100.0%
requestaaaaaa/file.go decodeFilesInStruct no function 81.2%
requestaaaaaa/file.go setFile no function 86.2%
requestaaaaaa/jsonbody.go checkJSONBodyContentType no function 100.0%
requestaaaaaa/jsonbody.go decodeJSONBody no function 100.0%
requestaaaaaa/jsonbody.go readJSON no function 100.0%
requestaaaaaa/middleware.go Decode no function 0.0%
requestaaaaaa/middleware.go DecoderMiddleware no function 94.1%
requestaaaaaa/middleware.go ValidatorMiddleware no function 88.9%
requestaaaaaa/reflect.go hasFileFields no function 100.0%

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

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.22µs ± 0%    1.22µs ± 5%   ~     (p=0.730 n=4+5)
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-4                              8.34µs ± 1%    8.32µs ± 1%   ~     (p=0.841 n=5+5)
Middleware_control-4                      2.65µs ± 0%    2.69µs ± 6%   ~     (p=0.873 n=4+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/response/gzip goos:linux goarch:amd64
Middleware-4                              1.17kB ± 5%    1.16kB ± 3%   ~     (p=0.595 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/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.22µs ± 5%
pkg:github.com/swaggest/rest/requestaaaaaa goos:linux goarch:amd64
Decoder_Decode-4                         625ns ± 0%
Decoder_Decode_json-4                   19.3µs ± 1%
Decoder_Decode_jsonParam-4              1.59µs ± 2%
Decoder_Decode_queryObject-4            4.14µs ± 1%
DecoderFunc_Decode-4                    1.74µs ± 1%
DecoderFactory_SetDecoderFunc-4         1.39µs ± 1%
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-4                            8.32µs ± 1%
Middleware_control-4                    2.69µs ± 6%

name                                    alloc/op
pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64
RequestValidator_ValidateRequestData-4  2.46kB ± 0%
pkg:github.com/swaggest/rest/requestaaaaaa goos:linux goarch:amd64
Decoder_Decode-4                          440B ± 0%
Decoder_Decode_json-4                   12.4kB ± 0%
Decoder_Decode_jsonParam-4                736B ± 0%
Decoder_Decode_queryObject-4            2.01kB ± 0%
DecoderFunc_Decode-4                    1.53kB ± 0%
DecoderFactory_SetDecoderFunc-4         1.02kB ± 0%
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-4                            1.16kB ± 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/requestaaaaaa goos:linux goarch:amd64
Decoder_Decode-4                          4.00 ± 0%
Decoder_Decode_json-4                      180 ± 0%
Decoder_Decode_jsonParam-4                12.0 ± 0%
Decoder_Decode_queryObject-4              37.0 ± 0%
DecoderFunc_Decode-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
Copy Markdown

@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.

AI Code Review by LlamaPReview

🎯 TL;DR & Recommendation

Recommendation: Request Changes

This PR introduces critical breaking changes that will cause compilation failures in example code, alongside minor template issues and code reordering that affects readability.

Priority File Category Impact Summary (≤12 words) Anchors
P1 _examples/.../json_body_manual.go Bug Breaks compilation by changing import to non-existent package. symbol:request.Loader
P1 _examples/advanced/dynamic_schema.go Bug Breaks compilation with incorrect import path. symbol:request.EmbeddedSetter
P2 .github/workflows/gocan.yml Security Introduces supply-chain risk with external binary.
P2 .github/ISSUE_TEMPLATE/feature_request.md Maintainability Degrades professionalism with typo in template name.
P2 _examples/.../gzip_pass_through_test.go Testing Reduces readability by reordering code without reason. symbol:Benchmark_directGzip

🔍 Notable Themes

  • Import path changes across example files risk breaking the entire example suite and user documentation, indicating a systematic issue in the PR.

💡 Have feedback? We'd love to hear it in our GitHub Discussions.
✨ This review was generated by LlamaPReview Advanced, which is free for all open-source projects. Learn more.

Comment on lines 14 to 17
"github.com/go-chi/chi/v5"
"github.com/swaggest/jsonschema-go"
"github.com/swaggest/rest/request"
"github.com/swaggest/rest/requestaaaaaa"
"github.com/swaggest/usecase"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 | Confidence: High

The import path for the request package is changed to a non-existent requestaaaaaa package in two files. This is a breaking change that will cause immediate compilation failures. The related_context shows widespread usage of github.com/swaggest/rest/request across the codebase (e.g., in web/service.go, gorillamux/example_test.go), and the request.Loader interface is documented in the README. Since this PR only changes examples and not the core library, existing code depending on the correct import path will break. The change appears to be a test artifact but would render the examples non-functional.

Suggested change
"github.com/go-chi/chi/v5"
"github.com/swaggest/jsonschema-go"
"github.com/swaggest/rest/request"
"github.com/swaggest/rest/requestaaaaaa"
"github.com/swaggest/usecase"
"github.com/swaggest/rest/request"

Evidence: symbol:request.Loader, path:web/service.go, path:gorillamux/example_test.go, path:jsonschema/validator_test.go, path:request/example_test.go

Comment on lines 9 to 12
"github.com/bool64/ctxd"
"github.com/swaggest/jsonschema-go"
"github.com/swaggest/rest/request"
"github.com/swaggest/rest/requestaaaaaa"
"github.com/swaggest/usecase"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 | Confidence: High

Same issue as above: the import path is changed to a non-existent package. This file also uses request.EmbeddedSetter which is part of the same package. The breakage is direct and will prevent compilation of the example.

Suggested change
"github.com/bool64/ctxd"
"github.com/swaggest/jsonschema-go"
"github.com/swaggest/rest/request"
"github.com/swaggest/rest/requestaaaaaa"
"github.com/swaggest/usecase"
"github.com/swaggest/rest/request"

Evidence: symbol:request.EmbeddedSetter, path:web/service.go

Comment on lines 1 to 3
---
name: Feature request
name: Feature requestaaaaaa
about: Suggest an idea for this project
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 | Confidence: High

The change appears to be a test or typo ("requestaaaaaa") in a template file name. This degrades the professionalism of the project's issue templates and could confuse users trying to submit feature requests. It's a minor maintainability issue.

Suggested change
---
name: Feature request
name: Feature requestaaaaaa
about: Suggest an idea for this project
---
name: Feature request
about: Suggest an idea for this project

Comment on lines +146 to +147
func Test_directGzip_perf(t *testing.T) {
res := testing.Benchmark(Benchmark_directGzip)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 | Confidence: High

The PR extensively reorders code within example files (moving type definitions after functions, swapping benchmark and test function order). While syntactically correct and not breaking functionality, this reduces consistency and readability. The related_context shows the same pattern in multiple files. For example, Test_directGzip_perf now appears before Test_noDirectGzip, reversing the previous logical grouping. This makes the test files harder to navigate and deviates from common Go conventions (tests often follow the order of the corresponding functions in the source file or are grouped by theme).

Comment on lines +1 to +7
name: gocan
on:
pull_request:

# Cancel the workflow in progress in newer build is about to start.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 | Confidence: Medium

Speculative: This new workflow downloads an external binary (gocan) from a personal repository (vearutop/gocan) and verifies its hash. While hash verification is a good practice, it introduces a dependency on an external, version 0.0.1 tool from a non-official source. This could be a supply-chain risk if the repository is compromised or the tool behaves maliciously. The workflow is configured to run on all pull requests, which could be abused if the PR source branch is untrusted. Consider whether this tool is necessary for CI and if so, ensure it's from a trusted, maintained source.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Examples Benchmark Result

Benchmark diff with base branch
name                       old time/op    new time/op    delta
pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64
_directGzip-4                17.3µs ± 7%    17.1µs ± 1%     ~     (p=0.730 n=5+4)
_directGzipHead-4            16.7µs ± 1%    17.0µs ± 3%     ~     (p=0.063 n=4+5)
_noDirectGzip-4              89.5µs ± 1%    90.6µs ± 1%   +1.16%  (p=0.016 n=5+5)
_directGzip_decode-4          377µs ± 0%     375µs ± 1%     ~     (p=0.222 n=5+5)
_noDirectGzip_decode-4       90.3µs ± 1%    91.5µs ± 0%   +1.35%  (p=0.008 n=5+5)
_jsonBody-4                  37.5µs ± 3%    37.6µs ± 0%     ~     (p=0.730 n=5+4)
_jsonBodyValidation-4        42.4µs ± 2%    43.2µs ± 2%     ~     (p=0.095 n=5+5)
_outputHeaders-4             17.1µs ± 1%    17.1µs ± 1%     ~     (p=0.548 n=5+5)
_requestResponseMapping-4    35.9µs ± 2%    36.6µs ± 1%     ~     (p=0.151 n=5+5)
_validation-4                38.9µs ± 1%    39.1µs ± 3%     ~     (p=0.690 n=5+5)
_noValidation-4              26.6µs ± 2%    27.0µs ± 2%     ~     (p=0.151 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4           19.9µs ± 1%    20.8µs ± 8%   +4.46%  (p=0.008 n=5+5)
_formOrJSON/json-4           23.8µs ±12%    23.3µs ± 1%     ~     (p=0.690 n=5+5)
_directGzip-4                17.2µs ± 2%    17.1µs ± 1%     ~     (p=0.595 n=5+5)
_directGzipHead-4            17.2µs ± 3%    18.1µs ± 1%   +5.01%  (p=0.008 n=5+5)
_noDirectGzip-4              94.7µs ± 1%    95.4µs ± 0%   +0.74%  (p=0.008 n=5+5)
_htmlResponse-4              30.7µs ± 1%    29.8µs ± 1%   -2.83%  (p=0.008 n=5+5)
_jsonBodyManual-4            21.9µs ± 1%    21.6µs ± 1%   -1.36%  (p=0.016 n=5+5)
_jsonBody-4                  33.7µs ± 2%    33.7µs ± 3%     ~     (p=1.000 n=5+5)
_jsonBodyValidation-4        43.4µs ± 2%    42.5µs ± 2%     ~     (p=0.151 n=5+5)
_outputHeaders-4             30.2µs ± 4%    30.2µs ± 1%     ~     (p=0.548 n=5+5)
_requestResponseMapping-4    35.7µs ± 4%    35.1µs ± 2%     ~     (p=0.222 n=5+5)
_validation-4                39.2µs ± 3%    37.6µs ± 1%   -4.09%  (p=0.016 n=5+5)
_noValidation-4              27.0µs ± 1%    26.7µs ± 2%     ~     (p=0.222 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4               19.9µs ± 1%    19.8µs ± 1%     ~     (p=0.413 n=4+5)
_ok-4                        19.9µs ± 1%    19.9µs ± 1%     ~     (p=0.690 n=5+5)
_invalidBody-4               28.4µs ± 7%    27.9µs ± 2%     ~     (p=0.905 n=5+4)

name                       old 50%:ms     new 50%:ms     delta
pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64
_directGzip-4                  0.75 ± 6%      0.76 ± 5%     ~     (p=0.841 n=5+5)
_directGzipHead-4              0.73 ±13%      0.72 ± 4%     ~     (p=0.548 n=5+5)
_noDirectGzip-4                4.08 ± 2%      4.18 ± 3%     ~     (p=0.151 n=5+5)
_directGzip_decode-4           12.4 ± 9%      12.3 ± 9%     ~     (p=1.000 n=5+5)
_noDirectGzip_decode-4         4.17 ± 4%      4.13 ± 4%     ~     (p=0.389 n=5+5)
_jsonBody-4                    1.55 ± 5%      1.53 ± 4%     ~     (p=0.841 n=5+5)
_jsonBodyValidation-4          1.69 ± 5%      1.75 ± 2%     ~     (p=0.056 n=5+5)
_outputHeaders-4               0.73 ± 7%      0.73 ± 8%     ~     (p=1.000 n=5+5)
_requestResponseMapping-4      1.38 ± 2%      1.42 ± 4%     ~     (p=0.190 n=5+5)
_validation-4                  1.58 ± 4%      1.55 ± 4%     ~     (p=0.222 n=5+5)
_noValidation-4                1.12 ± 3%      1.07 ± 9%     ~     (p=0.151 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             0.85 ± 4%      0.92 ± 4%   +8.60%  (p=0.008 n=5+5)
_formOrJSON/json-4             0.98 ± 3%      1.00 ± 7%     ~     (p=1.000 n=5+5)
_directGzip-4                  0.76 ± 4%      0.74 ± 5%     ~     (p=0.548 n=5+5)
_directGzipHead-4              0.74 ± 5%      0.78 ± 3%   +5.52%  (p=0.016 n=5+5)
_noDirectGzip-4                4.32 ± 2%      4.36 ± 5%     ~     (p=0.690 n=5+5)
_htmlResponse-4                1.25 ± 4%      1.26 ± 5%     ~     (p=1.000 n=5+5)
_jsonBodyManual-4              0.94 ± 2%      0.92 ± 5%     ~     (p=0.690 n=5+5)
_jsonBody-4                    1.30 ± 8%      1.32 ± 3%     ~     (p=0.548 n=5+5)
_jsonBodyValidation-4          1.71 ± 6%      1.64 ± 5%     ~     (p=0.222 n=5+5)
_outputHeaders-4               1.19 ± 7%      1.26 ± 4%     ~     (p=0.095 n=5+5)
_requestResponseMapping-4      1.44 ± 4%      1.39 ± 6%     ~     (p=0.222 n=5+5)
_validation-4                  1.56 ± 9%      1.50 ± 5%     ~     (p=0.310 n=5+5)
_noValidation-4                1.12 ± 7%      1.07 ± 4%     ~     (p=0.151 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 0.90 ± 3%      0.86 ± 6%     ~     (p=0.151 n=5+5)
_ok-4                          0.84 ± 3%      0.85 ± 4%     ~     (p=0.841 n=5+5)
_invalidBody-4                 1.18 ± 9%      1.19 ± 7%     ~     (p=0.841 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.53 ± 4%      1.56 ±11%     ~     (p=1.000 n=5+5)
_directGzipHead-4              1.54 ±21%      1.54 ± 6%     ~     (p=0.310 n=5+5)
_noDirectGzip-4                8.48 ± 1%      8.44 ± 3%     ~     (p=0.690 n=5+5)
_directGzip_decode-4           36.8 ± 8%      36.5 ± 6%     ~     (p=0.841 n=5+5)
_noDirectGzip_decode-4         8.38 ± 3%      8.49 ± 3%     ~     (p=0.222 n=5+5)
_jsonBody-4                    3.49 ± 3%      3.54 ± 5%     ~     (p=0.421 n=5+5)
_jsonBodyValidation-4          3.85 ± 5%      3.84 ± 2%     ~     (p=0.548 n=5+5)
_outputHeaders-4               1.53 ± 2%      1.54 ± 3%     ~     (p=1.000 n=5+5)
_requestResponseMapping-4      3.38 ± 5%      3.35 ± 3%     ~     (p=0.548 n=5+5)
_validation-4                  3.66 ± 3%      3.52 ± 3%     ~     (p=0.151 n=5+5)
_noValidation-4                2.49 ± 4%      2.50 ± 2%     ~     (p=0.841 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             1.81 ± 5%      1.91 ± 9%     ~     (p=0.056 n=5+5)
_formOrJSON/json-4             2.15 ±15%      2.11 ± 5%     ~     (p=0.889 n=5+5)
_directGzip-4                  1.55 ± 4%      1.57 ± 4%     ~     (p=0.841 n=5+5)
_directGzipHead-4              1.56 ± 6%      1.60 ± 4%     ~     (p=0.421 n=5+5)
_noDirectGzip-4                8.97 ± 2%      8.86 ± 6%     ~     (p=0.421 n=5+5)
_htmlResponse-4                2.89 ± 5%      2.82 ± 3%     ~     (p=0.222 n=5+5)
_jsonBodyManual-4              1.95 ± 4%      2.00 ± 3%     ~     (p=0.222 n=5+5)
_jsonBody-4                    3.15 ± 3%      3.20 ± 7%     ~     (p=0.841 n=5+5)
_jsonBodyValidation-4          4.00 ± 7%      3.98 ± 7%     ~     (p=1.000 n=5+5)
_outputHeaders-4               2.89 ± 5%      2.84 ± 4%     ~     (p=0.310 n=5+5)
_requestResponseMapping-4      3.38 ± 3%      3.25 ± 6%     ~     (p=0.151 n=5+5)
_validation-4                  3.62 ± 4%      3.42 ± 4%   -5.67%  (p=0.032 n=5+5)
_noValidation-4                2.50 ± 4%      2.53 ± 5%     ~     (p=1.000 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 1.83 ±10%      1.71 ± 3%     ~     (p=0.056 n=5+5)
_ok-4                          1.80 ± 3%      1.75 ± 3%   -2.97%  (p=0.032 n=5+5)
_invalidBody-4                 2.67 ± 9%      2.66 ±12%     ~     (p=0.841 n=5+5)

name                       old 99%:ms     new 99%:ms     delta
pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64
_directGzip-4                  2.95 ±34%      2.54 ± 5%     ~     (p=0.079 n=5+4)
_directGzipHead-4              2.59 ± 5%      2.65 ± 6%     ~     (p=0.556 n=4+5)
_noDirectGzip-4                12.6 ± 6%      13.2 ± 5%     ~     (p=0.095 n=5+5)
_directGzip_decode-4           74.7 ±18%      72.4 ± 7%     ~     (p=0.690 n=5+5)
_noDirectGzip_decode-4         12.9 ± 5%      13.0 ± 3%     ~     (p=0.421 n=5+5)
_jsonBody-4                    5.97 ± 4%      6.25 ±14%     ~     (p=0.841 n=5+5)
_jsonBodyValidation-4          6.56 ± 5%      6.90 ± 8%     ~     (p=0.095 n=5+5)
_outputHeaders-4               2.99 ±10%      2.89 ± 5%     ~     (p=0.421 n=5+5)
_requestResponseMapping-4      6.12 ± 7%      6.36 ±12%     ~     (p=0.421 n=5+5)
_validation-4                  6.19 ± 7%      6.19 ± 7%     ~     (p=1.000 n=5+5)
_noValidation-4                4.55 ±10%      4.69 ± 4%     ~     (p=0.841 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             3.05 ± 5%      3.50 ±28%     ~     (p=0.151 n=5+5)
_formOrJSON/json-4             3.89 ±43%      3.55 ± 8%     ~     (p=1.000 n=5+5)
_directGzip-4                  2.68 ± 6%      2.69 ± 2%     ~     (p=1.000 n=5+5)
_directGzipHead-4              2.61 ± 5%      2.73 ± 4%     ~     (p=0.222 n=5+5)
_noDirectGzip-4                13.8 ± 4%      13.7 ± 7%     ~     (p=0.548 n=5+5)
_htmlResponse-4                5.19 ± 5%      4.96 ± 5%     ~     (p=0.095 n=5+5)
_jsonBodyManual-4              3.57 ± 8%      3.64 ± 7%     ~     (p=0.548 n=5+5)
_jsonBody-4                    5.80 ± 5%      5.76 ± 4%     ~     (p=0.841 n=5+5)
_jsonBodyValidation-4          6.77 ± 6%      7.06 ±10%     ~     (p=0.421 n=5+5)
_outputHeaders-4               4.78 ± 3%      5.11 ± 6%   +6.94%  (p=0.016 n=5+5)
_requestResponseMapping-4      5.46 ± 4%      5.64 ± 9%     ~     (p=0.310 n=5+5)
_validation-4                  6.17 ± 8%      5.72 ± 6%     ~     (p=0.056 n=5+5)
_noValidation-4                4.43 ± 4%      4.37 ± 9%     ~     (p=0.841 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 2.96 ± 4%      3.84 ± 6%  +29.55%  (p=0.016 n=4+5)
_ok-4                          2.96 ± 6%      3.99 ± 6%  +34.70%  (p=0.008 n=5+5)
_invalidBody-4                 4.79 ±17%      5.00 ±26%     ~     (p=0.690 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                  5.17 ±37%      3.80 ± 2%  -26.56%  (p=0.016 n=5+4)
_directGzipHead-4              5.25 ±73%      4.38 ±22%     ~     (p=0.690 n=5+5)
_noDirectGzip-4                16.5 ±10%      18.6 ±17%  +12.76%  (p=0.032 n=5+5)
_directGzip_decode-4            100 ±21%       102 ± 5%     ~     (p=0.841 n=5+5)
_noDirectGzip_decode-4         16.5 ±10%      16.9 ± 8%     ~     (p=1.000 n=5+5)
_jsonBody-4                    9.16 ±10%      8.91 ±16%     ~     (p=0.421 n=5+5)
_jsonBodyValidation-4          11.1 ±33%      10.4 ± 7%     ~     (p=0.841 n=5+5)
_outputHeaders-4               5.34 ±15%      5.00 ±13%     ~     (p=0.222 n=5+5)
_requestResponseMapping-4      9.40 ± 9%      9.68 ±12%     ~     (p=0.690 n=5+5)
_validation-4                  9.62 ± 8%      9.24 ±12%     ~     (p=0.690 n=5+5)
_noValidation-4                7.05 ±15%      7.08 ± 5%     ~     (p=0.690 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             4.60 ±10%      5.69 ±33%     ~     (p=0.222 n=5+5)
_formOrJSON/json-4             5.93 ±53%      5.06 ±10%     ~     (p=0.548 n=5+5)
_directGzip-4                  4.20 ±27%      3.85 ±11%     ~     (p=0.421 n=5+5)
_directGzipHead-4              3.88 ± 8%      4.65 ±19%  +19.75%  (p=0.008 n=5+5)
_noDirectGzip-4                19.1 ±17%      19.1 ±11%     ~     (p=0.841 n=5+5)
_htmlResponse-4                7.80 ±11%      7.45 ±21%     ~     (p=0.421 n=5+5)
_jsonBodyManual-4              6.00 ±10%      5.60 ±12%     ~     (p=0.151 n=5+5)
_jsonBody-4                    8.49 ±24%      8.71 ± 9%     ~     (p=0.310 n=5+5)
_jsonBodyValidation-4          10.1 ± 9%      10.4 ± 5%     ~     (p=0.548 n=5+5)
_outputHeaders-4               6.94 ±13%      7.49 ±15%     ~     (p=0.095 n=5+5)
_requestResponseMapping-4      8.74 ±11%      8.77 ±10%     ~     (p=0.690 n=5+5)
_validation-4                  9.86 ± 6%      8.78 ± 5%  -10.93%  (p=0.008 n=5+5)
_noValidation-4                6.82 ±16%      7.07 ±11%     ~     (p=0.690 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 4.83 ±46%      5.55 ± 9%     ~     (p=0.151 n=5+5)
_ok-4                          4.21 ± 8%      6.13 ±11%  +45.59%  (p=0.008 n=5+5)
_invalidBody-4                 7.18 ±25%      6.80 ± 4%     ~     (p=0.730 n=5+4)

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.9k ± 7%     58.6k ± 1%     ~     (p=0.730 n=5+4)
_directGzipHead-4             59.9k ± 1%     58.9k ± 3%     ~     (p=0.063 n=4+5)
_noDirectGzip-4               11.2k ± 1%     11.0k ± 1%   -1.15%  (p=0.016 n=5+5)
_directGzip_decode-4          2.65k ± 0%     2.67k ± 1%     ~     (p=0.167 n=5+5)
_noDirectGzip_decode-4        11.1k ± 1%     10.9k ± 0%   -1.34%  (p=0.008 n=5+5)
_jsonBody-4                   26.7k ± 3%     26.6k ± 0%     ~     (p=0.730 n=5+4)
_jsonBodyValidation-4         23.6k ± 2%     23.1k ± 2%     ~     (p=0.095 n=5+5)
_outputHeaders-4              58.4k ± 1%     58.4k ± 1%     ~     (p=0.548 n=5+5)
_requestResponseMapping-4     27.9k ± 2%     27.3k ± 1%     ~     (p=0.151 n=5+5)
_validation-4                 25.7k ± 1%     25.6k ± 3%     ~     (p=0.690 n=5+5)
_noValidation-4               37.5k ± 2%     37.1k ± 2%     ~     (p=0.151 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4            50.2k ± 1%     48.1k ± 7%   -4.12%  (p=0.008 n=5+5)
_formOrJSON/json-4            42.1k ±11%     43.0k ± 1%     ~     (p=0.690 n=5+5)
_directGzip-4                 58.0k ± 2%     58.3k ± 1%     ~     (p=0.690 n=5+5)
_directGzipHead-4             58.2k ± 3%     55.4k ± 1%   -4.79%  (p=0.008 n=5+5)
_noDirectGzip-4               10.6k ± 1%     10.5k ± 0%   -0.73%  (p=0.008 n=5+5)
_htmlResponse-4               32.6k ± 1%     33.6k ± 1%   +2.91%  (p=0.008 n=5+5)
_jsonBodyManual-4             45.6k ± 1%     46.2k ± 1%   +1.39%  (p=0.016 n=5+5)
_jsonBody-4                   29.6k ± 2%     29.7k ± 3%     ~     (p=1.000 n=5+5)
_jsonBodyValidation-4         23.0k ± 2%     23.5k ± 2%     ~     (p=0.151 n=5+5)
_outputHeaders-4              33.1k ± 4%     33.1k ± 1%     ~     (p=0.548 n=5+5)
_requestResponseMapping-4     28.0k ± 4%     28.5k ± 2%     ~     (p=0.222 n=5+5)
_validation-4                 25.5k ± 3%     26.6k ± 1%   +4.24%  (p=0.016 n=5+5)
_noValidation-4               37.1k ± 1%     37.5k ± 2%     ~     (p=0.222 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                50.1k ± 1%     50.4k ± 1%     ~     (p=0.413 n=4+5)
_ok-4                         50.3k ± 1%     50.2k ± 1%     ~     (p=0.690 n=5+5)
_invalidBody-4                35.3k ± 7%     34.7k ±13%     ~     (p=0.841 n=5+5)

name                       old alloc/op   new alloc/op   delta
pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64
_directGzip-4                3.94kB ± 0%    3.94kB ± 0%     ~     (p=0.905 n=5+5)
_directGzipHead-4            3.94kB ± 0%    3.94kB ± 0%     ~     (p=0.381 n=5+5)
_noDirectGzip-4              7.00kB ±26%    6.97kB ±14%     ~     (p=1.000 n=5+5)
_directGzip_decode-4          398kB ± 0%     398kB ± 0%     ~     (p=1.000 n=5+5)
_noDirectGzip_decode-4       5.98kB ± 7%    6.77kB ± 3%  +13.33%  (p=0.008 n=5+5)
_jsonBody-4                  13.6kB ± 0%    13.6kB ± 0%     ~     (p=1.000 n=5+5)
_jsonBodyValidation-4        19.2kB ± 0%    19.3kB ± 0%     ~     (p=0.460 n=5+5)
_outputHeaders-4             3.61kB ± 0%    3.61kB ± 0%     ~     (p=0.651 n=5+5)
_requestResponseMapping-4    16.6kB ± 0%    16.6kB ± 0%     ~     (p=0.214 n=5+5)
_validation-4                16.5kB ± 0%    16.5kB ± 0%     ~     (p=0.111 n=5+5)
_noValidation-4              7.82kB ± 0%    7.82kB ± 0%     ~     (p=0.238 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4           6.14kB ± 0%    6.15kB ± 0%     ~     (p=0.214 n=5+5)
_formOrJSON/json-4           6.54kB ± 0%    6.53kB ± 0%   -0.06%  (p=0.016 n=5+5)
_directGzip-4                3.95kB ± 0%    3.95kB ± 0%     ~     (p=0.657 n=4+4)
_directGzipHead-4            3.95kB ± 0%    3.95kB ± 0%     ~     (p=0.468 n=5+5)
_noDirectGzip-4              7.64kB ±20%    7.32kB ±22%     ~     (p=0.690 n=5+5)
_htmlResponse-4              8.07kB ± 0%    8.07kB ± 0%     ~     (p=0.659 n=5+5)
_jsonBodyManual-4            4.89kB ± 0%    4.89kB ± 0%     ~     (p=0.333 n=5+4)
_jsonBody-4                  10.7kB ± 0%    10.7kB ± 0%     ~     (p=0.794 n=5+5)
_jsonBodyValidation-4        19.3kB ± 0%    19.3kB ± 0%     ~     (p=0.500 n=5+5)
_outputHeaders-4             10.3kB ± 0%    10.4kB ± 0%     ~     (p=0.222 n=5+5)
_requestResponseMapping-4    16.6kB ± 0%    16.6kB ± 0%     ~     (p=0.738 n=5+5)
_validation-4                16.6kB ± 0%    16.6kB ± 0%     ~     (p=0.460 n=5+5)
_noValidation-4              7.85kB ± 0%    7.86kB ± 0%     ~     (p=0.119 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4               5.21kB ± 0%    5.17kB ± 0%   -0.79%  (p=0.008 n=5+5)
_ok-4                        5.12kB ± 0%    5.08kB ± 0%   -0.78%  (p=0.029 n=4+4)
_invalidBody-4               8.82kB ± 0%    8.83kB ± 0%     ~     (p=0.413 n=4+5)

name                       old allocs/op  new allocs/op  delta
pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64
_directGzip-4                  42.0 ± 0%      42.0 ± 0%     ~     (all equal)
_directGzipHead-4              42.0 ± 0%      42.0 ± 0%     ~     (all equal)
_noDirectGzip-4                49.2 ± 4%      49.2 ± 4%     ~     (p=1.000 n=5+5)
_directGzip_decode-4            486 ± 0%       487 ± 0%     ~     (p=0.905 n=5+5)
_noDirectGzip_decode-4         50.0 ± 0%      50.0 ± 0%     ~     (all equal)
_jsonBody-4                     132 ± 0%       132 ± 0%     ~     (all equal)
_jsonBodyValidation-4           191 ± 0%       191 ± 0%     ~     (all equal)
_outputHeaders-4               35.0 ± 0%      35.0 ± 0%     ~     (all equal)
_requestResponseMapping-4       125 ± 0%       126 ± 0%     ~     (p=0.167 n=5+5)
_validation-4                   156 ± 0%       156 ± 0%     ~     (all equal)
_noValidation-4                90.0 ± 0%      90.0 ± 0%     ~     (all equal)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             59.0 ± 0%      59.0 ± 0%     ~     (all equal)
_formOrJSON/json-4             65.0 ± 0%      65.0 ± 0%     ~     (all equal)
_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)
_htmlResponse-4                 124 ± 0%       124 ± 0%     ~     (all equal)
_jsonBodyManual-4              49.0 ± 0%      49.0 ± 0%     ~     (all equal)
_jsonBody-4                     101 ± 0%       101 ± 0%     ~     (all equal)
_jsonBodyValidation-4           192 ± 0%       192 ± 0%     ~     (all equal)
_outputHeaders-4                113 ± 0%       113 ± 0%     ~     (all equal)
_requestResponseMapping-4       126 ± 0%       126 ± 0%     ~     (all equal)
_validation-4                   157 ± 0%       157 ± 0%     ~     (all equal)
_noValidation-4                91.0 ± 0%      91.0 ± 0%     ~     (all equal)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 53.0 ± 0%      53.0 ± 0%     ~     (all equal)
_ok-4                          49.0 ± 0%      49.0 ± 0%     ~     (all equal)
_invalidBody-4                 97.0 ± 0%      97.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.

1 participant