mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
zb: pick client IPs from a pool, closes #472
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
a5e091e3d2
commit
ca8b866c46
+6
-2
@@ -13,7 +13,7 @@ import (
|
||||
func NewPerfRootCmd() *cobra.Command {
|
||||
showVersion := false
|
||||
|
||||
var auth, workdir, repo, outFmt string
|
||||
var auth, workdir, repo, outFmt, srcIPs, srcCIDR string
|
||||
|
||||
var concurrency, requests int
|
||||
|
||||
@@ -45,12 +45,16 @@ func NewPerfRootCmd() *cobra.Command {
|
||||
|
||||
requests = concurrency * (requests / concurrency)
|
||||
|
||||
Perf(workdir, url, auth, repo, concurrency, requests, outFmt)
|
||||
Perf(workdir, url, auth, repo, concurrency, requests, outFmt, srcIPs, srcCIDR)
|
||||
},
|
||||
}
|
||||
|
||||
rootCmd.Flags().StringVarP(&auth, "auth-creds", "A", "",
|
||||
"Use colon-separated BASIC auth creds")
|
||||
rootCmd.Flags().StringVarP(&srcIPs, "src-ips", "i", "",
|
||||
"Use colon-separated ips to make requests from, src-ips and src-cidr are mutually exclusive")
|
||||
rootCmd.Flags().StringVarP(&srcCIDR, "src-cidr", "s", "",
|
||||
"Use specified cidr to obtain ips to make requests from, src-ips and src-cidr are mutually exclusive")
|
||||
rootCmd.Flags().StringVarP(&workdir, "working-dir", "d", "",
|
||||
"Use specified directory to store test data")
|
||||
rootCmd.Flags().StringVarP(&repo, "repo", "r", "",
|
||||
|
||||
Reference in New Issue
Block a user