diff --git a/cmd/kairosflux-bench/report.go b/cmd/kairosflux-bench/report.go index 3a5f125..e67fc9c 100644 --- a/cmd/kairosflux-bench/report.go +++ b/cmd/kairosflux-bench/report.go @@ -73,22 +73,3 @@ func ProgressBar(current, total int64, start time.Time) string { return fmt.Sprintf("\r[%s] %.0f%% | %d/%d ops | %.0f qps | %s elapsed", bar, pct, current, total, qps, elapsed.Round(time.Second)) } - -func modeDescription(cfg Config) string { - switch cfg.Mode { - case "put": - return fmt.Sprintf("PUT only (%d B keys, %d B values, %d workers)", - cfg.KeySize, cfg.ValueSize, cfg.Workers) - case "get": - return fmt.Sprintf("GET only (%d keys, %d workers)", - cfg.KeyCount, cfg.Workers) - case "delete": - return fmt.Sprintf("DELETE only (%d keys, %d workers)", - cfg.KeyCount, cfg.Workers) - case "mixed": - return fmt.Sprintf("Mixed PUT/GET (%.0f%% reads, %d workers)", - cfg.ReadRatio*100, cfg.Workers) - default: - return cfg.Mode - } -} diff --git a/cmd/kairosflux-bench/runner.go b/cmd/kairosflux-bench/runner.go index 69f7925..b93fe05 100644 --- a/cmd/kairosflux-bench/runner.go +++ b/cmd/kairosflux-bench/runner.go @@ -284,18 +284,6 @@ func recv(conn *net.TCPConn) ([]byte, error) { return []byte{}, nil } -func readFull(conn *net.TCPConn, buf []byte) (int, error) { - total := 0 - for total < len(buf) { - n, err := conn.Read(buf[total:]) - if err != nil { - return total, err - } - total += n - } - return total, nil -} - // parseStatus 拆解响应负载 [statusLen u8][status bytes], 返回 status 字符串与剩余字节 func parseStatus(payload []byte) (string, []byte, error) { if len(payload) < 1 {