Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikhita/go-openapi-validate-benchmark
Benchmark tests for checking the performance of validation/defaulting using go-openapi.
https://github.com/nikhita/go-openapi-validate-benchmark
benchmark golang openapi performance
Last synced: about 1 month ago
JSON representation
Benchmark tests for checking the performance of validation/defaulting using go-openapi.
- Host: GitHub
- URL: https://github.com/nikhita/go-openapi-validate-benchmark
- Owner: nikhita
- License: mit
- Created: 2017-09-25T13:15:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-27T14:33:31.000Z (over 7 years ago)
- Last Synced: 2024-11-12T07:04:00.387Z (3 months ago)
- Topics: benchmark, golang, openapi, performance
- Language: Go
- Size: 2.19 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-openapi-validate-benchmark
Benchmark tests for checking the performance of validation/defaulting against json marshalling/unmarshalling (using `k8s.io/apimachinery/pkg/util/json`).
The schema used for this test is at [`testdata/schema.json`](testdata/schema.json).
**JSON Marshaling and Unmarshaling**:
```
BenchmarkOpenAPI-4 30000 60140 ns/op 12226 B/op 284 allocs/op
```**Validation and Defaulting**:
```
BenchmarkOpenAPI-4 3000 402998 ns/op 256750 B/op 1631 allocs/op
```**Comparison between both**:
```
benchmark old ns/op new ns/op delta
BenchmarkOpenAPI-4 60140 402998 +570.10%benchmark old allocs new allocs delta
BenchmarkOpenAPI-4 284 1631 +474.30%benchmark old bytes new bytes delta
BenchmarkOpenAPI-4 12226 256750 +2000.03%
```