mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #9707 from spzala/master
etcdctl/check: create progress bar for datascale
This commit is contained in:
commit
e0b74d4656
@ -336,6 +336,10 @@ func newCheckDatascaleCommand(cmd *cobra.Command, args []string) {
|
||||
}
|
||||
|
||||
fmt.Println(fmt.Sprintf("Start data scale check for work load [%v key-value pairs, %v bytes per key-value, %v concurrent clients].", cfg.limit, cfg.kvSize, cfg.clients))
|
||||
bar := pb.New(cfg.limit)
|
||||
bar.Format("Bom !")
|
||||
bar.Start()
|
||||
|
||||
for i := range clients {
|
||||
go func(c *v3.Client) {
|
||||
defer wg.Done()
|
||||
@ -343,6 +347,7 @@ func newCheckDatascaleCommand(cmd *cobra.Command, args []string) {
|
||||
st := time.Now()
|
||||
_, derr := c.Do(context.Background(), op)
|
||||
r.Results() <- report.Result{Err: derr, Start: st, End: time.Now()}
|
||||
bar.Increment()
|
||||
}
|
||||
}(clients[i])
|
||||
}
|
||||
@ -358,6 +363,7 @@ func newCheckDatascaleCommand(cmd *cobra.Command, args []string) {
|
||||
sc := r.Stats()
|
||||
wg.Wait()
|
||||
close(r.Results())
|
||||
bar.Finish()
|
||||
s := <-sc
|
||||
|
||||
// get the process_resident_memory_bytes after the put operations
|
||||
|
Loading…
x
Reference in New Issue
Block a user