diff --git a/etcdctl/ctlv3/command/check.go b/etcdctl/ctlv3/command/check.go index edeb630095ab..30652805a9ab 100644 --- a/etcdctl/ctlv3/command/check.go +++ b/etcdctl/ctlv3/command/check.go @@ -365,22 +365,15 @@ func newCheckDatascaleCommand(cmd *cobra.Command, args []string) { } bytesUsed := bytesAfter - bytesBefore + mbUsed := bytesUsed / (1024 * 1024) - ok = true if len(s.ErrorDist) != 0 { fmt.Println("FAIL: too many errors") for k, v := range s.ErrorDist { fmt.Printf("FAIL: ERROR(%v) -> %d\n", k, v) } - ok = false - } - - mbUsed := bytesUsed / (1024 * 1024) - - if ok { - fmt.Println(fmt.Sprintf("PASS: Approximate system memory used : %v MB.", strconv.FormatFloat(float64(mbUsed), 'f', 2, 64))) - } else { - fmt.Println("FAIL: Memory usage could not be determined.") os.Exit(ExitError) + } else { + fmt.Println(fmt.Sprintf("PASS: Approximate system memory used : %v MB.", strconv.FormatFloat(float64(mbUsed), 'f', 2, 64))) } }