Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eskip: add BenchmarkJsonUnmarshal #2876

Merged
merged 1 commit into from
Jan 19, 2024

Commits on Jan 19, 2024

  1. eskip: add BenchmarkJsonUnmarshal

    Add a benchmark of unmarshalling 10000 routes from JSON and
    compare its performance to eskip parsing.
    
    This establishes a baseline for future optimizations.
    
    ```
    $ benchstat -col .name <(go test ./eskip -run=NONE -bench='BenchmarkJsonUnmarshal|BenchmarkParse$' -count=10)
    goos: linux
    goarch: amd64
    pkg: github.com/zalando/skipper/eskip
        │    Parse    │             JsonUnmarshal              │
        │   sec/op    │    sec/op      vs base                 │
    *-8   247.1m ± 1%   1281.4m ± 16%  +418.51% (p=0.000 n=10)
    
        │    Parse     │            JsonUnmarshal            │
        │     B/op     │     B/op      vs base               │
    *-8   49.02Mi ± 0%   46.54Mi ± 0%  -5.06% (p=0.000 n=10)
    
        │    Parse    │            JsonUnmarshal            │
        │  allocs/op  │  allocs/op   vs base                │
    *-8   1.080M ± 0%   1.420M ± 0%  +31.48% (p=0.000 n=10)
    ```
    
    Signed-off-by: Alexander Yastrebov <[email protected]>
    AlexanderYastrebov committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    ec481ee View commit details
    Browse the repository at this point in the history