Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions cmd/kairosflux-bench/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
12 changes: 0 additions & 12 deletions cmd/kairosflux-bench/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading