8000 Add example for contentType encoder/decoder by vearutop · Pull Request #224 · swaggest/rest · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add example for contentType encoder/decoder #224

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 1 commit into from
Feb 15, 2025
Merged

Conversation

vearutop
Copy link
Member

No description provided.

Copy link

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 115 (+1) 9026 (+26) 6521 (+20) 673 1832 (+6) 1071 220.3K (+575B)
JSON 3 2159 (+23) 2159 (+23) 0 0 0 82.8K (+821B)

Copy link

Go API Changes

# summary
Inferred base version: v0.2.71
Suggested version: v0.2.72

Copy link

Unit Test Coverage

total: (statements) 80.7%

Coverage of changed lines

No changes in testable statements.

Coverage diff with base branch

No changes in coverage.

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 PR Summary

  • Business value and requirements alignment: The PR adds an example for contentType encoder/decoder, which enhances the library's functionality and improves its interoperability with other systems.
  • Key components modified: The OpenAPI specification and the Go code for the advanced-generic-openapi31 example.
  • Impact assessment: The PR introduces a new endpoint /raw-body with support for raw body requests and responses, impacting the AP 8000 I surface and routing logic. It also introduces new content types (text/csv and text/plain), which may require updates to the serialization/deserialization process.
  • System dependencies and integration impacts: The new endpoint may impact other components that rely on the routing logic or the serialization/deserialization process. It also introduces new content types, which may require updates to existing middleware or clients.

1.2 Architecture Changes

  • System design modifications: The PR introduces a new endpoint /raw-body with support for raw body requests and responses, using the contentType tag to discriminate where to read/write the body.
  • Component interactions: The new endpoint interacts with the existing routing mechanism and may impact other components that rely on the routing logic or the serialization/deserialization process.
  • Integration points: The new endpoint introduces new content types (text/csv and text/plain), which may require updates to the integration points with existing middleware or clients.

2. Detailed Technical Analysis

2.1 Code Logic Deep-Dive

Core Logic Changes

  • _examples/advanced-generic-openapi31/raw_body.go - rawBody function
    • Submitted PR Code:
    func rawBody() usecase.Interactor {
    	type rawBody struct {
    		TextBody string `contentType:"text/plain"`
    		CSVBody  string `contentType:"text/csv"`
    	}

    	u := usecase.NewInteractor(func(ctx context.Context, input rawBody, output *rawBody) error {
    		*output = input

    		return nil
    	})

    	u.SetTitle("Request/response With Raw Body")
    	u.SetDescription("The `contentType` tag acts as a discriminator of where to read/write the body.")
    	u.SetTags("Request", "Response")

    	return u
    }
  • Analysis:
    • The rawBody function defines a new interactor for handling raw body requests and responses. It uses the contentType tag to discriminate where to read/write the body, which introduces a new logic that needs to be thoroughly tested.
    • Edge cases and error handling: The current implementation doesn't handle any edge cases or errors. It's essential to consider scenarios where the content type is missing, invalid, or not supported.
    • Cross-component impact: The new interactor may impact other components that rely on the routing logic or the serialization/deserialization process.
    • Business logic considerations: The new interactor should be consistent with the existing business logic and follow the same guidelines for error handling and input validation.
  • LlamaPReview Suggested Improvements:
    func rawBody() usecase.Interactor {
    	type rawBody struct {
    		TextBody string `contentType:"text/plain"`
    		CSVBody  string `contentType:"text/csv"`
    	}

    	u := usecase.NewInteractor(func(ctx context.Context, input, output *rawBody) error {
    		if input == nil {
    			return errors.New("input cannot be nil")
    		}

    		*output = *input

    		return nil
    	})

    	u.SetTitle("Request/response With Raw Body")
    	u.SetDescription("The `contentType` tag acts as a discriminator of where to read/write the body.")
    	u.SetTags("Request", "Response")

    	return u
    }
  • Improvement rationale:

    • Technical benefits: The suggested improvement adds input validation to ensure that the input is not nil, preventing potential panics and improving the overall robustness of the system.
    • Business value: Proper error handling and input validation enhance the system's reliability and maintainability, reducing the likelihood of unexpected failures.
    • Risk assessment: Without proper input validation, the system may behave unexpectedly or crash when encountering nil inputs, leading to data loss or downtime.
  • _examples/advanced-generic-openapi31/_testdata/openapi.json - raw-body endpoint

    • Submitted PR Code:
    "/raw-body":{
    	"parameters":[
    		{
    			"name":"X-Umbrella-Header","in":"header","description":"This request header is supported in all operations.",
    			"schema":{"type":"string"}
    		}
    	],
    	"post":{
    		"tags":["Request","Response"],"summary":"Request/response With Raw Body",
    		"description":"The `contentType` tag acts as a discriminator of where to read/write the body.",
    		"requestBody":{"content":{"text/csv":{"schema":{"type":"string"}},"text/plain":{"schema":{"type":"string"}}}},
    		"responses":{
    			"200":{
    				"description":"OK",
    				"content":{
    					"application/json":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}},
    					"text/plain":{"schema":{"type":"string"}}
    				}
    			}
    		}
    	}
    }
  • Analysis:
    • The raw-body endpoint introduces new content types (text/csv and text/plain) for request and response bodies. This change may impact the serialization/deserialization process and require updates to the existing middleware.
    • Edge cases and error handling: The current implementation doesn't handle any edge cases or errors related to the new content types. It's essential to consider scenarios where the content type is missing, invalid, or not supported.
    • Cross-component impact: The new endpoint may impact other components that rely on the routing logic or the serialization/deserialization process.
    • Business logic considerations: The new endpoint should be consistent with the existing business logic and follow the same guidelines for error handling and input validation.
  • LlamaPReview Suggested Improvements:
    "/raw-body":{
    	"parameters":[
    		{
    			"name":"X-Umbrella-Header","in":"header","description":"This request header is supported in all operations.",
    			"schema":{"type":"string"}
    		}
    	],
    	"post":{
    		"tags":["Request","Response"],"summary":"Request/response With Raw Body",
    		"description":"The `contentType` tag acts as a discriminator of where to read/write the body.",
    		"requestBody":{"content":{"text/csv":{"schema":{"type":"string"}},"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"object"}}}},
    		"responses":{
    			"200":{
    				"description":"OK",
    				"content":{
    					"application/json":{"schema":{"type":"object"}},"text/csv":{"schema":{"type":"string"}},
    					"text/plain":{"schema":{"type":"string"}}
    				}
    			}
    		}
    	}
    }
  • Improvement rationale:
    • Technical benefits: The suggested improvement adds support for application/json content type in the request body, allowing clients to send JSON data along with the raw body. This improves the flexibility of the endpoint and enables better integration with existing clients.
    • Business value: Supporting application/json content type in the request body enhances the system's interoperability and allows clients to use the endpoint more effectively.
    • Risk assessment: Without proper support for application/json content type, the system may not be able to handle requests from clients that expect to send JSON data.

2.2 Implementation Quality

  • Code organization and structure: The PR maintains a clear and consistent structure, with the new endpoint and interactor defined in separate files.
  • Design patterns usage: The PR uses the interactor pattern to separate the business logic from the input/output handling, which promotes code organization and testability.
  • Error handling approach: The PR lacks proper error handling and input validation, which should be addressed to improve the overall robustness of the system.
  • Resource management: Not applicable in this PR.

3. Critical Findings

3.1 Potential Issues

  • 🔴 Critical Issues

    • Missing error handling and input validation: The new interactor and endpoint lack proper error handling and input validation, which may lead to unexpected behavior or crashes. Impact: The system may behave unexpectedly or crash when encountering invalid inputs or edge cases. Recommendation: Implement proper error handling and input validation to ensure the system's robustness and reliability.
    • Lack of support for application/json content type: The new endpoint doesn't support application/json content type in the request body, which may limit its interoperability with existing clients. Impact: Clients that expect to send JSON data may not be able to use the endpoint effectively. Recommendation: Add support for application/json content type in the request body to improve the system's interoperability.
  • 🟡 Warnings

    • Potential compatibility issues: The introduction of new content types may lead to compatibility issues with existing clients or servers that don't support these types. Potential risks: Existing clients or servers may not be able to communicate with the new endpoint effectively. Suggested improvements: Test the new content types with existing clients and servers to ensure compatibility and consider providing fallbacks or default content types if necessary.

3.2 Code Quality Concerns

  • Maintainability aspects: The PR maintains a clear and consistent structure, with the new endpoint and interactor defined in separate files. However, the lack of proper error handling and input validation may impact the system's maintainability in the long run.
  • Readability issues: The PR is well-structured and easy to read, with clear comments and consistent formatting.
  • Performance bottlenecks: Not applicable in this PR.

4. Security Assessment

  • Authentication/Authorization impacts: The new endpoint doesn't introduce any new authentication or authorization requirements.
  • Data handling concerns: The new endpoint handles raw body requests and responses, which may introduce new data handling concerns. It's essential to ensure that the raw body data is properly sanitized and validated to prevent code injection or cross-site scripting (XSS) attacks.
  • Input validation: The PR lacks proper input validation, which may lead to security vulnerabilities. It's crucial to validate and sanitize all user inputs to prevent code injection or XSS attacks.
  • Security best practices: The PR doesn't follow any security best practices, such as input validation, output encoding, or secure coding practices.
  • Potential security risks: Without proper input validation and data handling, the system may be vulnerable to code injection or XSS attacks.
  • Mitigation strategies: Implement proper input validation and data handling to prevent code injection or XSS attacks. Follow security best practices, such as input validation, output encoding, and secure coding practices.
  • Security testing requirements: Conduct security testing, including penetration testing and vulnerability assessments, to identify and address any security vulnerabilities in the system.

5. Testing Strategy

5.1 Test Coverage

  • Unit test analysis: The PR doesn't include any unit tests for the new interactor or endpoint. It's essential to write unit tests to cover the new logic and ensure its correctness.
  • Integration test requirements: Update integration tests to include the new endpoint and validate that it works correctly with the existing system.
  • Edge cases coverage: Test the new content type logic with various edge cases, such as empty or malformed content types.

5.2 Test Recommendations

Suggested Test Cases

  func TestRawBodyInteractor(t *testing.T) {
  	t.Run("valid input", func(t *testing.T) {
  		input := &rawBody{
  			TextBody: "plain text",
  			CSVBody:  "csv data",
  		}
  		output := &rawBody{}

  		err := rawBody().Execute(context.Background(), input, output)
  		assert.NoError(t, err)
  		assert.Equal(t, input, output)
  	})

  	t.Run("nil input", func(t *testing.T) {
  		input := (*rawBody)(nil)
  		output := &rawBody{}

  		err := rawBody().Execute(context.Background(), input, output)
  		assert.Error(t, err)
  		assert.Equal(t, "input cannot be nil", err.Error())
  		assert.Nil(t, output)
  	})
  }
  • Coverage improvements: Write unit tests to cover the new interactor and endpoint, focusing on edge cases and error handling.
  • Performance testing needs: Not applicable in this PR.

6. Documentation & Maintenance

  • Documentation updates needed: Update the documentation to include the new endpoint and its functionality, as well as any relevant changes to the existing API surface.
  • Long-term maintenance considerations: The PR introduces new content types and logic, which may require additional maintenance efforts in the long run. It's essential to ensure that the new logic is well-documented, testable, and follows best practices to facilitate future maintenance.

7. Deployment & Operations

  • Deployment impact and strategy: The PR introduces a new endpoint, which may require updates to the deployment process or infrastructure. It's essential to ensure that the new endpoint is properly integrated with the existing system and that the deployment process is updated accordingly.
  • Key operational considerations: The new endpoint may introduce new operational considerations, such as monitoring or logging requirements. It's crucial to ensure that the new endpoint is properly monitored and logged to facilitate troubleshooting and maintenance.

8. Summary & Recommendations

8.1 Key Action Items

  1. Implement proper error handling and input validation in the new interactor and endpoint to ensure the system's robustness and reliability.
  2. Add support for application/json content type in the request body of the new endpoint to improve the system's interoperability with existing clients.
  3. Write unit tests to cover the new interactor and endpoint, focusing on edge cases and error handling.
  4. Update integration tests to include the new endpoint and validate that it works correctly with the existing system.
  5. Update the documentation to include the new endpoint and its functionality, as well as any relevant changes to the existing API surface.

8.2 Future Considerations

  • Technical evolution path: As the library evolves, consider adding support for more content types and improving the flexibility of the raw body handling logic.
  • Business capability evolution: As the business capabilities evolve, the API may need to support new content types or functionality. It's essential to ensure that the API is flexible and extensible enough to accommodate these changes.
  • System integration impacts: As the system integrates with other components, it's crucial to ensure that the new endpoint and content types are compatible with the existing infrastructure and that any necessary updates are implemented accordingly.

💡 Help Shape LlamaPReview
How's this review format working for you? Vote in our Github Discussion Polls to help us improve your review experience!

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-4    1.15µs ± 5%    1.12µs ± 2%    ~     (p=0.341 n=5+5)
pkg:github.com/swaggest/rest/request goos:linux goarch:amd64
Decoder_Decode-4                           600ns ± 0%     607ns ± 3%    ~     (p=0.286 n=4+5)
DecoderFunc_Decode-4                      1.69µs ± 1%    1.69µs ± 1%    ~     (p=1.000 n=5+5)
Decoder_Decode_json-4                     18.6µs ± 1%    18.7µs ± 1%    ~     (p=0.222 n=5+5)
Decoder_Decode_queryObject-4              3.98µs ± 1%    3.98µs ± 1%    ~     (p=0.968 n=5+5)
Decoder_Decode_jsonParam-4                1.56µs ± 0%    1.55µs ± 0%  -0.67%  (p=0.008 n=5+5)
DecoderFactory_SetDecoderFunc-4           1.34µs ± 0%    1.34µs ± 0%  -0.27%  (p=0.024 n=5+5)
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-4                              11.3µs ± 2%    11.2µs ± 0%    ~     (p=0.095 n=5+5)
Middleware_control-4                      2.71µs ± 1%    2.72µs ± 2%    ~     (p=0.690 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.444 n=5+5)
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 ± 4%    1.15kB ± 1%    ~     (p=0.278 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.12µs ± 2%
pkg:github.com/swaggest/rest/request goos:linux goarch:amd64
Decoder_Decode-4                         607ns ± 3%
DecoderFunc_Decode-4                    1.69µs ± 1%
Decoder_Decode_json-4                   18.7µs ± 1%
Decoder_Decode_queryObject-4            3.98µs ± 1%
Decoder_Decode_jsonParam-4              1.55µs ± 0%
DecoderFactory_SetDecoderFunc-4         1.34µs ± 0%
pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64
Middleware-4                            11.2µs ± 0%
Middleware_control-4                    2.72µs ± 2%

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.15kB ± 1%
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%

@vearutop vearutop merged commit 37e565a into master Feb 15, 2025
9 checks passed
@vearutop vearutop deleted the content-type-example branch February 15, 2025 01:44
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-4                16.9µs ± 3%    16.8µs ± 0%    ~     (p=0.730 n=5+4)
_directGzipHead-4            17.2µs ± 9%    16.6µs ± 1%    ~     (p=0.452 n=5+5)
_noDirectGzip-4              93.3µs ± 1%    93.2µs ± 1%    ~     (p=0.690 n=5+5)
_directGzip_decode-4          342µs ± 2%     338µs ± 1%    ~     (p=0.310 n=5+5)
_noDirectGzip_decode-4       93.9µs ± 1%    94.3µs ± 2%    ~     (p=0.841 n=5+5)
_jsonBody-4                  35.9µs ± 1%    36.4µs ± 0%  +1.51%  (p=0.016 n=5+5)
_jsonBodyValidation-4        41.0µs ± 1%    41.6µs ± 1%  +1.50%  (p=0.032 n=5+5)
_outputHeaders-4             16.8µs ± 2%    17.1µs ± 1%    ~     (p=0.151 n=5+5)
_requestResponseMapping-4    34.4µs ± 3%    35.5µs ± 1%  +3.12%  (p=0.008 n=5+5)
_validation-4                37.1µs ± 1%    38.0µs ± 2%  +2.48%  (p=0.016 n=5+5)
_noValidation-4              26.5µs ± 2%    26.8µs ± 1%    ~     (p=0.056 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4           20.3µs ± 3%    20.3µs ± 1%    ~     (p=0.548 n=5+5)
_formOrJSON/json-4           23.6µs ± 2%    24.2µs ±10%    ~     (p=0.548 n=5+5)
_directGzip-4                17.1µs ± 1%    17.3µs ± 2%    ~     (p=0.056 n=5+5)
_directGzipHead-4            17.3µs ± 3%    17.4µs ± 3%    ~     (p=0.690 n=5+5)
_noDirectGzip-4              94.6µs ± 1%    94.7µs ± 1%    ~     (p=0.841 n=5+5)
_htmlResponse-4              30.3µs ± 2%    30.4µs ± 1%    ~     (p=0.548 n=5+5)
_jsonBodyManual-4            21.1µs ± 2%    21.4µs ± 1%    ~     (p=0.095 n=5+5)
_jsonBody-4                  32.1µs ± 4%    31.9µs ± 2%    ~     (p=0.841 n=5+5)
_jsonBodyValidation-4        40.0µs ± 2%    40.4µs ± 2%    ~     (p=0.151 n=5+5)
_outputHeaders-4             29.3µs ± 2%    29.7µs ± 2%    ~     (p=0.056 n=5+5)
_requestResponseMapping-4    33.6µs ± 2%    33.8µs ± 2%    ~     (p=0.690 n=5+5)
_validation-4                35.9µs ± 1%    36.0µs ± 2%    ~     (p=0.690 n=5+5)
_noValidation-4              26.2µs ± 2%    26.3µs ± 2%    ~     (p=0.548 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4               20.3µs ± 9%    19.5µs ± 1%    ~     (p=0.421 n=5+5)
_ok-4                        19.5µs ± 1%    20.1µs ±10%    ~     (p=0.214 n=5+5)
_invalidBody-4               28.2µs ± 5%    28.0µs ± 5%    ~     (p=0.690 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.72 ± 4%      0.77 ± 6%    ~     (p=0.095 n=5+5)
_directGzipHead-4              0.72 ± 3%      0.74 ± 6%    ~     (p=0.690 n=5+5)
_noDirectGzip-4                4.24 ± 5%      4.23 ± 4%    ~     (p=1.000 n=5+5)
_directGzip_decode-4           11.8 ± 7%      10.8 ± 8%    ~     (p=0.056 n=5+5)
_noDirectGzip_decode-4         4.45 ± 6%      4.33 ± 3%    ~     (p=0.310 n=5+5)
_jsonBody-4                    1.49 ± 4%      1.52 ± 4%    ~     (p=0.651 n=5+5)
_jsonBodyValidation-4          1.66 ± 2%      1.77 ± 3%  +6.59%  (p=0.008 n=5+5)
_outputHeaders-4               0.72 ± 3%      0.72 ± 3%    ~     (p=0.690 n=5+5)
_requestResponseMapping-4      1.37 ± 3%      1.46 ± 4%  +6.04%  (p=0.040 n=5+5)
_validation-4                  1.56 ± 8%      1.57 ± 5%    ~     (p=1.000 n=5+5)
_noValidation-4                1.11 ±10%      1.13 ± 6%    ~     (p=0.762 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             0.89 ± 5%      0.88 ± 5%    ~     (p=0.548 n=5+5)
_formOrJSON/json-4             0.97 ± 4%      1.02 ± 4%  +4.36%  (p=0.032 n=5+5)
_directGzip-4                  0.77 ± 6%      0.75 ± 1%  -3.04%  (p=0.040 n=5+5)
_directGzipHead-4              0.79 ± 4%      0.74 ± 4%  -5.63%  (p=0.032 n=5+5)
_noDirectGzip-4                4.32 ± 8%      4.42 ± 5%    ~     (p=0.310 n=5+5)
_htmlResponse-4                1.24 ± 1%      1.26 ± 3%    ~     (p=0.413 n=4+5)
_jsonBodyManual-4              0.92 ± 4%      0.93 ± 6%    ~     (p=0.841 n=5+5)
_jsonBody-4                    1.33 ± 8%      1.34 ± 2%    ~     (p=0.222 n=5+5)
_jsonBodyValidation-4          1.69 ± 7%      1.69 ± 5%    ~     (p=1.000 n=5+5)
_outputHeaders-4               1.21 ± 7%      1.20 ± 5%    ~     (p=0.548 n=5+5)
_requestResponseMapping-4      1.40 ± 8%      1.42 ± 4%    ~     (p=0.841 n=5+5)
_validation-4                  1.47 ± 4%      1.47 ± 6%    ~     (p=1.000 n=5+5)
_noValidation-4                1.10 ± 2%      1.13 ±10%    ~     (p=0.548 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 0.90 ± 6%      0.88 ± 6%    ~     (p=0.548 n=5+5)
_ok-4                          0.87 ± 4%      0.91 ± 5%    ~     (p=0.095 n=5+5)
_invalidBody-4                 1.16 ± 6%      1.17 ± 5%    ~     (p=0.595 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 ± 2%      1.58 ± 8%    ~     (p=0.595 n=5+5)
_directGzipHead-4              1.54 ± 5%      1.51 ± 4%    ~     (p=0.421 n=5+5)
_noDirectGzip-4                8.57 ± 4%      8.70 ± 3%    ~     (p=0.310 n=5+5)
_directGzip_decode-4           33.2 ± 4%      34.0 ± 5%    ~     (p=0.421 n=5+5)
_noDirectGzip_decode-4         8.77 ± 3%      8.84 ± 6%    ~     (p=0.841 n=5+5)
_jsonBody-4                    3.29 ± 4%      3.39 ± 4%    ~     (p=0.151 n=5+5)
_jsonBodyValidation-4          3.65 ± 5%      3.75 ± 6%    ~     (p=0.310 n=5+5)
_outputHeaders-4               1.51 ± 6%      1.51 ± 4%    ~     (p=1.000 n=5+5)
_requestResponseMapping-4      3.12 ± 4%      3.30 ± 3%  +5.79%  (p=0.032 n=5+5)
_validation-4                  3.34 ± 4%      3.44 ± 4%    ~     (p=0.222 n=5+5)
_noValidation-4                2.47 ± 7%      2.57 ± 5%    ~     (p=0.222 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             1.83 ± 4%      1.82 ± 5%    ~     (p=1.000 n=5+5)
_formOrJSON/json-4             2.15 ± 5%      2.22 ± 9%    ~     (p=0.690 n=5+5)
_directGzip-4                  1.52 ± 3%      1.55 ± 2%    ~     (p=0.389 n=5+5)
_directGzipHead-4              1.55 ± 7%      1.58 ± 5%    ~     (p=0.421 n=5+5)
_noDirectGzip-4                8.97 ± 5%      8.88 ± 3%    ~     (p=0.841 n=5+5)
_htmlResponse-4                2.83 ± 6%      2.84 ± 2%    ~     (p=0.548 n=5+5)
_jsonBodyManual-4              1.91 ± 4%      1.92 ± 3%    ~     (p=1.000 n=5+5)
_jsonBody-4                    2.98 ± 5%      3.01 ± 6%    ~     (p=0.690 n=5+5)
_jsonBodyValidation-4          3.58 ± 2%      3.66 ± 4%    ~     (p=0.222 n=5+5)
_outputHeaders-4               2.81 ± 3%      2.79 ± 3%    ~     (p=0.841 n=5+5)
_requestResponseMapping-4      3.06 ± 2%      3.07 ± 3%    ~     (p=1.000 n=5+5)
_validation-4                  3.45 ± 4%      3.36 ± 7%    ~     (p=0.310 n=5+5)
_noValidation-4                2.48 ± 5%      2.43 ± 2%    ~  
8000
   (p=0.690 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 1.83 ±10%      1.73 ± 7%    ~     (p=0.095 n=5+5)
_ok-4                          1.77 ± 4%      1.81 ±14%    ~     (p=1.000 n=5+5)
_invalidBody-4                 2.68 ± 4%      2.66 ±12%    ~     (p=0.548 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.53 ±16%      2.38 ± 2%    ~     (p=0.190 n=5+4)
_directGzipHead-4              2.89 ±44%      2.46 ± 4%    ~     (p=0.310 n=5+5)
_noDirectGzip-4                13.6 ± 5%      13.5 ± 3%    ~     (p=1.000 n=5+5)
_directGzip_decode-4           62.5 ±10%      66.7 ±11%    ~     (p=0.421 n=5+5)
_noDirectGzip_decode-4         13.5 ± 6%      13.5 ±10%    ~     (p=0.841 n=5+5)
_jsonBody-4                    5.19 ± 6%      5.23 ± 4%    ~     (p=1.000 n=5+5)
_jsonBodyValidation-4          6.16 ± 7%      6.12 ± 5%    ~     (p=1.000 n=5+5)
_outputHeaders-4               2.70 ± 6%      2.70 ± 5%    ~     (p=1.000 n=5+5)
_requestResponseMapping-4      5.26 ± 3%      5.21 ± 3%    ~     (p=0.548 n=5+5)
_validation-4                  5.59 ± 6%      5.72 ± 7%    ~     (p=0.421 n=5+5)
_noValidation-4                4.08 ± 6%      4.20 ± 6%    ~     (p=0.310 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             3.03 ±14%      3.00 ± 5%    ~     (p=0.690 n=5+5)
_formOrJSON/json-4             3.63 ± 3%      3.95 ±39%    ~     (p=0.841 n=5+5)
_directGzip-4                  2.51 ± 2%      2.50 ± 4%    ~     (p=0.841 n=5+5)
_directGzipHead-4              2.58 ± 5%      2.55 ± 5%    ~     (p=0.548 n=5+5)
_noDirectGzip-4                13.6 ± 6%      14.2 ± 3%    ~     (p=0.063 n=5+5)
_htmlResponse-4                4.56 ± 6%      4.65 ± 8%    ~     (p=0.841 n=5+5)
_jsonBodyManual-4              3.27 ± 6%      3.33 ± 7%    ~     (p=0.841 n=5+5)
_jsonBody-4                    4.81 ±11%      4.75 ± 4%    ~     (p=0.841 n=5+5)
_jsonBodyValidation-4          5.77 ± 7%      5.81 ± 7%    ~     (p=1.000 n=5+5)
_outputHeaders-4               4.47 ± 7%      4.55 ± 6%    ~     (p=0.222 n=5+5)
_requestResponseMapping-4      4.60 ± 4%      4.58 ± 4%    ~     (p=0.690 n=5+5)
_validation-4                  5.13 ± 5%      5.15 ± 5%    ~     (p=1.000 n=5+5)
_noValidation-4                4.11 ± 5%      4.06 ± 2%    ~     (p=0.421 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 3.47 ±30%      2.77 ± 3%    ~     (p=0.056 n=5+5)
_ok-4                          2.79 ± 4%      3.06 ±44%    ~     (p=0.690 n=5+5)
_invalidBody-4                 4.63 ± 4%      4.50 ± 5%    ~     (p=0.310 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                  3.77 ±22%      4.21 ±54%    ~     (p=0.841 n=5+5)
_directGzipHead-4              4.69 ±41%      3.68 ±11%    ~     (p=0.206 n=5+5)
_noDirectGzip-4                18.8 ±13%      17.3 ± 8%    ~     (p=0.151 n=5+5)
_directGzip_decode-4           87.8 ± 4%      90.8 ± 7%    ~     (p=0.310 n=5+5)
_noDirectGzip_decode-4         18.9 ± 9%      18.4 ±22%    ~     (p=0.421 n=5+5)
_jsonBody-4                    7.75 ± 7%      7.05 ± 8%  -9.08%  (p=0.032 n=5+5)
_jsonBodyValidation-4          8.67 ±10%      8.63 ±20%    ~     (p=0.690 n=5+5)
_outputHeaders-4               4.76 ±12%      4.79 ± 4%    ~     (p=0.841 n=5+5)
_requestResponseMapping-4      7.48 ±11%      7.30 ±15%    ~     (p=0.310 n=5+5)
_validation-4                  7.87 ± 5%      8.27 ± 7%    ~     (p=0.421 n=5+5)
_noValidation-4                6.33 ±14%      6.31 ±18%    ~     (p=1.000 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4             4.67 ±28%      4.15 ± 3%    ~     (p=0.690 n=5+5)
_formOrJSON/json-4             5.01 ±10%      4.86 ± 6%    ~     (p=0.905 n=5+4)
_directGzip-4                  4.04 ±18%      3.62 ±10%    ~     (p=0.095 n=5+5)
_directGzipHead-4              3.90 ±14%      4.11 ±15%    ~     (p=0.222 n=5+5)
_noDirectGzip-4                17.5 ±16%      18.9 ±12%    ~     (p=0.151 n=5+5)
_htmlResponse-4                6.94 ±26%      6.86 ±11%    ~     (p=1.000 n=5+5)
_jsonBodyManual-4              4.99 ±12%      4.96 ±12%    ~     (p=1.000 n=5+5)
_jsonBody-4                    6.78 ±11%      6.53 ± 9%    ~     (p=0.548 n=5+5)
_jsonBodyValidation-4          7.93 ± 6%      8.52 ±10%    ~     (p=0.095 n=5+5)
_outputHeaders-4               6.25 ± 8%      6.57 ± 8%    ~     (p=0.397 n=5+5)
_requestResponseMapping-4      6.55 ±10%      6.95 ±13%    ~     (p=0.548 n=5+5)
_validation-4                  7.68 ± 9%      7.21 ± 4%    ~     (p=0.151 n=5+5)
_noValidation-4                5.81 ±12%      5.65 ± 3%    ~     (p=0.690 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                 5.37 ±37%      3.93 ±10%    ~     (p=0.222 n=5+5)
_ok-4                          3.88 ± 5%      4.63 ±57%    ~     (p=0.841 n=5+5)
_invalidBody-4                 6.62 ±18%      6.18 ± 7%    ~     (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-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                 59.1k ± 3%     59.4k ± 0%    ~     (p=0.730 n=5+4)
_directGzipHead-4             58.4k ± 8%     60.1k ± 1%    ~     (p=0.548 n=5+5)
_noDirectGzip-4               10.7k ± 1%     10.7k ± 1%    ~     (p=0.690 n=5+5)
_directGzip_decode-4          2.92k ± 2%     2.96k ± 1%    ~     (p=0.310 n=5+5)
_noDirectGzip_decode-4        10.6k ± 1%     10.6k ± 2%    ~     (p=0.841 n=5+5)
_jsonBody-4                   27.9k ± 1%     27.5k ± 0%  -1.49%  (p=0.016 n=5+5)
_jsonBodyValidation-4         24.4k ± 1%     24.1k ± 1%  -1.46%  (p=0.032 n=5+5)
_outputHeaders-4              59.4k ± 2%     58.6k ± 1%    ~     (p=0.151 n=5+5)
_requestResponseMapping-4     29.1k ± 3%     28.2k ± 1%  -3.04%  (p=0.008 n=5+5)
_validation-4                 27.0k ± 1%     26.3k ± 2%  -2.41%  (p=0.016 n=5+5)
_noValidation-4               37.8k ± 2%     37.2k ± 1%    ~     (p=0.056 n=5+5)
pkg:github.com/swaggest/rest/_examples/advanced-generic-openapi31 goos:linux goarch:amd64
_formOrJSON/form-4            49.2k ± 3%     49.2k ± 1%    ~     (p=0.548 n=5+5)
_formOrJSON/json-4            42.4k ± 1%     41.4k ± 9%    ~     (p=0.548 n=5+5)
_directGzip-4                 58.5k ± 1%     57.9k ± 2%    ~     (p=0.056 n=5+5)
_directGzipHead-4             57.8k ± 3%     57.6k ± 3%    ~     (p=0.690 n=5+5)
_noDirectGzip-4               10.6k ± 1%     10.6k ± 1%    ~     (p=0.841 n=5+5)
_htmlResponse-4               33.0k ± 2%     32.9k ± 1%    ~     (p=0.548 n=5+5)
_jsonBodyManual-4             47.3k ± 2%     46.7k ± 1%    ~     (p=0.095 n=5+5)
_jsonBody-4                   31.2k ± 4%     31.4k ± 2%    ~     (p=0.841 n=5+5)
_jsonBodyValidation-4         25.0k ± 2%     24.8k ± 2%    ~     (p=0.151 n=5+5)
_outputHeaders-4              34.1k ± 2%     33.7k ± 2%    ~     (p=0.056 n=5+5)
_requestResponseMapping-4     29.7k ± 2%     29.6k ± 2%    ~     (p=0.690 n=5+5)
_validation-4                 27.8k ± 1%     27.8k ± 2%    ~     (p=0.690 n=5+5)
_noValidation-4               38.2k ± 2%     38.0k ± 2%    ~     (p=0.548 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4                49.3k ± 8%     51.3k ± 1%    ~     (p=0.421 n=5+5)
_ok-4                         51.3k ± 1%     49.8k ± 9%    ~     (p=0.222 n=5+5)
_invalidBody-4                35.4k ± 5%     35.8k ± 5%    ~     (p=0.690 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.492 n=5+5)
_directGzipHead-4            4.04kB ± 0%    4.04kB ± 0%    ~     (p=0.413 n=5+4)
_noDirectGzip-4              7.46kB ±20%    7.41kB ±20%    ~     (p=1.000 n=5+5)
_directGzip_decode-4          399kB ± 0%     399kB ± 0%    ~     (p=0.548 n=5+5)
_noDirectGzip_decode-4       7.05kB ±13%    6.51kB ± 9%    ~     (p=0.095 n=5+5)
_jsonBody-4                  13.7kB ± 0%    13.7kB ± 0%    ~     (p=1.000 n=5+5)
_jsonBodyValidation-4        19.5kB ± 0%    19.5kB ± 0%    ~     (p=0.730 n=5+5)
_outputHeaders-4             3.71kB ± 0%    3.71kB ± 0%    ~     (p=0.952 n=5+5)
_requestResponseMapping-4    16.8kB ± 0%    16.8kB ± 0%    ~     (p=0.833 n=5+5)
_validation-4                16.7kB ± 0%    16.7kB ± 0%    ~     (p=0.905 n=5+5)
_noValidation-4              7.92kB ± 0%    7.92kB ± 0%    ~     (p=0.754 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=0.444 n=5+5)
_formOrJSON/json-4           6.64kB ± 0%    6.64kB ± 0%    ~     (p=0.167 n=5+5)
_directGzip-4                4.05kB ± 0%    4.05kB ± 0%    ~     (p=1.000 n=4+4)
_directGzipHead-4            4.05kB ± 0%    4.05kB ± 0%    ~     (p=0.476 n=5+5)
_noDirectGzip-4              8.09kB ±17%    7.72kB ±24%    ~     (p=0.548 n=5+5)
_htmlResponse-4              8.54kB ± 0%    8.54kB ± 0%    ~     (p=0.333 n=5+5)
_jsonBodyManual-4            4.96kB ± 0%    4.96kB ± 0%    ~     (p=0.556 n=5+5)
_jsonBody-4                  10.7kB ± 0%    10.7kB ± 0%    ~     (p=0.508 n=5+5)
_jsonBodyValidation-4        19.5kB ± 0%    19.5kB ± 0%    ~     (p=0.913 n=5+5)
_outputHeaders-4             10.5kB ± 0%    10.5kB ± 0%    ~     (p=0.294 n=5+5)
_requestResponseMapping-4    16.8kB ± 0%    16.8kB ± 0%    ~     (p=0.516 n=5+5)
_validation-4                16.7kB ± 0%    16.7kB ± 0%    ~     (p=0.063 n=5+5)
_noValidation-4              7.95kB ± 0%    7.96kB ± 0%    ~     (p=0.508 n=5+5)
pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64
_notFoundSrv-4               5.24kB ± 0%    5.24kB ± 0%    ~     (p=0.627 n=5+5)
_ok-4                        5.15kB ± 0%    5.15kB ± 0%    ~     (p=0.286 n=4+4)
_invalidBody-4               8.82kB ± 0%    8.82kB ± 0%    ~     (p=0.886 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%    ~     (all equal)
_noDirectGzip_decode-4         51.0 ± 0%      51.0 ± 0%    ~     (all equal)
_jsonBody-4                     130 ± 0%       130 ± 0%    ~     (all equal)
_jsonBodyValidation-4           187 ± 0%       187 ± 0%    ~     (all equal)
_outputHeaders-4               36.0 ± 0%      36.0 ± 0%    ~     (all equal)
_requestResponseMapping-4       124 ± 0%       124 ± 0%    ~     (all equal)
_validation-4                   155 ± 0%       155 ± 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                 146 ± 0%       146 ± 0%    ~     (all equal)
_jsonBodyManual-4              49.0 ± 0%      49.0 ± 0%    ~     (all equal)
_jsonBody-4                     100 ± 0%       100 ± 0%    ~     (all equal)
_jsonBodyValidation-4           188 ± 0%       188 ± 0%    ~     (all equal)
_outputHeaders-4                112 ± 0%       112 ± 0%    ~     (all equal)
_requestResponseMapping-4       125 ± 0%       125 ± 0%    ~     (all equal)
_validation-4                   155 ± 0%       155 ± 0%    ~     (all equal)
_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                 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
0