zotregistry.dev/zot@v1.4.4-0.20240314164342-eec277e14d20/cmd/zb/README.md (about)

     1  # `zb`
     2  
     3  ## `zb` is a registry benchmarking tool which can run against any [distribution spec](https://github.com/opencontainers/distribution-spec) comformant registry.
     4  
     5  
     6  ```
     7  Usage:
     8    zb [options] <url> [flags]
     9  
    10  Flags:
    11    -A, --auth-creds string      Use colon-separated BASIC auth creds
    12    -c, --concurrency int        Number of multiple requests to make at a time (default 1)
    13    -h, --help                   help for zb
    14    -o, --output-format string   Output format of test results: stdout (default), json, ci-cd
    15    -r, --repo string            Use specified repo on remote registry for test data
    16    -n, --requests int           Number of requests to perform (default 1)
    17    -s, --src-cidr string        Use specified cidr to obtain ips to make requests from, src-ips and src-cidr are mutually exclusive
    18    -i, --src-ips string         Use colon-separated ips to make requests from, src-ips and src-cidr are mutually exclusive
    19    -v, --version                Show the version and exit
    20    -d, --working-dir string     Use specified directory to store test data
    21    ```
    22    
    23  ## Command example
    24  ```
    25  ./bin/zb-linux-amd64 -c 10 -n 100 --src-cidr 127.0.0.0/8 -A user:pass http://localhost:8080
    26  ```
    27  
    28  ```
    29  docker run -net=host -it ghcr.io/project-zot/zb-linux-amd64:latest -c 2 -n 10 -s 127.0.0.0/8 http://localhost:5000
    30  ```
    31  
    32  ## Command output
    33  
    34  ```console
    35  $ zb -c 10 -n 1000 http://localhost:8080
    36  
    37  Registry URL: http://localhost:8080
    38  
    39  Concurrency Level: 2
    40  Total requests:    100
    41  Working dir:
    42  
    43  ============
    44  Test name:            Get Catalog
    45  Time taken for tests: 45.397205ms
    46  Complete requests:    100
    47  Failed requests:      0
    48  Requests per second:  2202.7788
    49  
    50  2xx responses: 100
    51  
    52  min: 402.259µs
    53  max: 3.295887ms
    54  p50: 855.045µs
    55  p75: 971.709µs
    56  p90: 1.127389ms
    57  p99: 3.295887ms
    58  
    59  ============
    60  Test name:            Push Monolith 1MB
    61  Time taken for tests: 952.336383ms
    62  Complete requests:    100
    63  Failed requests:      0
    64  Requests per second:  105.00491
    65  
    66  2xx responses: 100
    67  
    68  min: 11.125673ms
    69  max: 26.375356ms
    70  p50: 18.917253ms
    71  p75: 21.753441ms
    72  p90: 24.02137ms
    73  p99: 26.375356ms
    74  
    75  ...
    76  ```
    77  
    78  # References
    79  
    80  [1] [https://github.com/opencontainers/distribution-spec/tree/main/conformance](https://github.com/opencontainers/distribution-spec/tree/main/conformance)
    81  [2] [https://en.wikipedia.org/wiki/ApacheBench](https://en.wikipedia.org/wiki/ApacheBench)