etcdctl/ctlv3: fix "unconvert" warnings

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee 2018-04-30 14:25:54 -07:00
parent 1917e5c543
commit b44e43278a

View File

@ -192,7 +192,7 @@ func newCheckPerfCommand(cmd *cobra.Command, args []string) {
cctx, ccancel := context.WithTimeout(context.Background(), time.Duration(cfg.duration)*time.Second)
defer ccancel()
for limit.Wait(cctx) == nil {
binary.PutVarint(k, int64(rand.Int63n(math.MaxInt64)))
binary.PutVarint(k, rand.Int63n(math.MaxInt64))
requests <- v3.OpPut(checkPerfPrefix+string(k), v)
}
close(requests)
@ -349,7 +349,7 @@ func newCheckDatascaleCommand(cmd *cobra.Command, args []string) {
go func() {
for i := 0; i < cfg.limit; i++ {
binary.PutVarint(k, int64(rand.Int63n(math.MaxInt64)))
binary.PutVarint(k, rand.Int63n(math.MaxInt64))
requests <- v3.OpPut(checkDatascalePrefix+string(k), v)
}
close(requests)
@ -400,6 +400,6 @@ func newCheckDatascaleCommand(cmd *cobra.Command, args []string) {
}
os.Exit(ExitError)
} else {
fmt.Println(fmt.Sprintf("PASS: Approximate system memory used : %v MB.", strconv.FormatFloat(float64(mbUsed), 'f', 2, 64)))
fmt.Println(fmt.Sprintf("PASS: Approximate system memory used : %v MB.", strconv.FormatFloat(mbUsed, 'f', 2, 64)))
}
}