mirror of
https://github.com/project-zot/zot.git
synced 2024-12-30 22:34:13 -05:00
perf(zb): cleanup tool output (#1033)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
parent
ffa223de43
commit
72abab4947
3 changed files with 75 additions and 55 deletions
46
README.md
46
README.md
|
@ -309,54 +309,10 @@ will produce `bin/zb` binary.
|
||||||
|
|
||||||
## Running `zb`
|
## Running `zb`
|
||||||
|
|
||||||
```console
|
See [details](./cmd/zb/README.md)
|
||||||
$ zb -c 10 -n 1000 http://localhost:8080
|
|
||||||
|
|
||||||
Registry URL: http://localhost:8080
|
|
||||||
|
|
||||||
Concurrency Level: 2
|
|
||||||
Total requests: 100
|
|
||||||
Working dir:
|
|
||||||
|
|
||||||
============
|
|
||||||
Test name: Get Catalog
|
|
||||||
Time taken for tests: 45.397205ms
|
|
||||||
Complete requests: 100
|
|
||||||
Failed requests: 0
|
|
||||||
Requests per second: 2202.7788
|
|
||||||
|
|
||||||
2xx responses: 100
|
|
||||||
|
|
||||||
min: 402.259µs
|
|
||||||
max: 3.295887ms
|
|
||||||
p50: 855.045µs
|
|
||||||
p75: 971.709µs
|
|
||||||
p90: 1.127389ms
|
|
||||||
p99: 3.295887ms
|
|
||||||
|
|
||||||
============
|
|
||||||
Test name: Push Monolith 1MB
|
|
||||||
Time taken for tests: 952.336383ms
|
|
||||||
Complete requests: 100
|
|
||||||
Failed requests: 0
|
|
||||||
Requests per second: 105.00491
|
|
||||||
|
|
||||||
2xx responses: 100
|
|
||||||
|
|
||||||
min: 11.125673ms
|
|
||||||
max: 26.375356ms
|
|
||||||
p50: 18.917253ms
|
|
||||||
p75: 21.753441ms
|
|
||||||
p90: 24.02137ms
|
|
||||||
p99: 26.375356ms
|
|
||||||
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
# Ecosystem
|
# Ecosystem
|
||||||
|
|
||||||
|
|
||||||
## skopeo
|
## skopeo
|
||||||
|
|
||||||
[skopeo](https://github.com/containers/skopeo) is a tool to work with remote
|
[skopeo](https://github.com/containers/skopeo) is a tool to work with remote
|
||||||
|
|
|
@ -25,6 +25,56 @@ Flags:
|
||||||
./bin/zb-linux-amd64 -c 10 -n 100 --src-cidr 127.0.0.0/8 -A user:pass http://localhost:8080
|
./bin/zb-linux-amd64 -c 10 -n 100 --src-cidr 127.0.0.0/8 -A user:pass http://localhost:8080
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|
||||||
|
## Command output
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ zb -c 10 -n 1000 http://localhost:8080
|
||||||
|
|
||||||
|
Registry URL: http://localhost:8080
|
||||||
|
|
||||||
|
Concurrency Level: 2
|
||||||
|
Total requests: 100
|
||||||
|
Working dir:
|
||||||
|
|
||||||
|
============
|
||||||
|
Test name: Get Catalog
|
||||||
|
Time taken for tests: 45.397205ms
|
||||||
|
Complete requests: 100
|
||||||
|
Failed requests: 0
|
||||||
|
Requests per second: 2202.7788
|
||||||
|
|
||||||
|
2xx responses: 100
|
||||||
|
|
||||||
|
min: 402.259µs
|
||||||
|
max: 3.295887ms
|
||||||
|
p50: 855.045µs
|
||||||
|
p75: 971.709µs
|
||||||
|
p90: 1.127389ms
|
||||||
|
p99: 3.295887ms
|
||||||
|
|
||||||
|
============
|
||||||
|
Test name: Push Monolith 1MB
|
||||||
|
Time taken for tests: 952.336383ms
|
||||||
|
Complete requests: 100
|
||||||
|
Failed requests: 0
|
||||||
|
Requests per second: 105.00491
|
||||||
|
|
||||||
|
2xx responses: 100
|
||||||
|
|
||||||
|
min: 11.125673ms
|
||||||
|
max: 26.375356ms
|
||||||
|
p50: 18.917253ms
|
||||||
|
p75: 21.753441ms
|
||||||
|
p90: 24.02137ms
|
||||||
|
p99: 26.375356ms
|
||||||
|
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
# References
|
# References
|
||||||
|
|
||||||
[1] [https://github.com/opencontainers/distribution-spec/tree/main/conformance](https://github.com/opencontainers/distribution-spec/tree/main/conformance)
|
[1] [https://github.com/opencontainers/distribution-spec/tree/main/conformance](https://github.com/opencontainers/distribution-spec/tree/main/conformance)
|
||||||
|
|
|
@ -640,21 +640,35 @@ func Perf(
|
||||||
log.SetFlags(0)
|
log.SetFlags(0)
|
||||||
log.SetOutput(tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', tabwriter.TabIndent))
|
log.SetOutput(tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', tabwriter.TabIndent))
|
||||||
|
|
||||||
// initialize test data
|
|
||||||
setup(workdir)
|
|
||||||
defer teardown(workdir)
|
|
||||||
|
|
||||||
// common header
|
// common header
|
||||||
log.Printf("Registry URL:\t%s", url)
|
log.Printf("Registry URL:\t%s", url)
|
||||||
log.Printf("\n")
|
log.Printf("\n")
|
||||||
log.Printf("Concurrency Level:\t%v", concurrency)
|
log.Printf("Concurrency Level:\t%v", concurrency)
|
||||||
log.Printf("Total requests:\t%v", requests)
|
log.Printf("Total requests:\t%v", requests)
|
||||||
|
|
||||||
|
if workdir == "" {
|
||||||
|
cwd, err := os.Getwd()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal("unable to get current working dir")
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Printf("Working dir:\t%v", cwd)
|
||||||
|
} else {
|
||||||
log.Printf("Working dir:\t%v", workdir)
|
log.Printf("Working dir:\t%v", workdir)
|
||||||
|
}
|
||||||
|
|
||||||
log.Printf("\n")
|
log.Printf("\n")
|
||||||
|
|
||||||
zbError := false
|
// initialize test data
|
||||||
|
log.Printf("Preparing test data ...\n")
|
||||||
|
|
||||||
|
setup(workdir)
|
||||||
|
defer teardown(workdir)
|
||||||
|
|
||||||
|
log.Printf("Starting tests ...\n")
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
|
zbError := false
|
||||||
|
|
||||||
// get host ips from command line to make requests from
|
// get host ips from command line to make requests from
|
||||||
var ips []string
|
var ips []string
|
||||||
|
|
Loading…
Reference in a new issue