From 4e29fe18b0f21f61c7551dda54882f3d86dee388 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Tue, 9 Jul 2024 12:30:21 +0530 Subject: [PATCH] roachprod-microbench: address review comments in clean command There were post-review comments in https://github.com/cockroachdb/cockroach/pull/126810. This change aims to address those. Epic: none Release note: None --- pkg/cmd/roachprod-microbench/clean.go | 7 ------- pkg/cmd/roachprod-microbench/main.go | 9 ++++----- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/pkg/cmd/roachprod-microbench/clean.go b/pkg/cmd/roachprod-microbench/clean.go index 1f05566e547a..07dcc6e85ec3 100644 --- a/pkg/cmd/roachprod-microbench/clean.go +++ b/pkg/cmd/roachprod-microbench/clean.go @@ -30,13 +30,6 @@ type clean struct { inputFile *os.File } -func defaultCleanConfig() cleanConfig { - return cleanConfig{ - inputFilePath: "", - outputFilePath: "", - } -} - func newClean(config cleanConfig) (*clean, error) { file, err := os.Open(config.inputFilePath) if err != nil { diff --git a/pkg/cmd/roachprod-microbench/main.go b/pkg/cmd/roachprod-microbench/main.go index 1c050c7b5c6d..1753525df608 100644 --- a/pkg/cmd/roachprod-microbench/main.go +++ b/pkg/cmd/roachprod-microbench/main.go @@ -54,9 +54,8 @@ Typical usage: } func makeCleanCommand() *cobra.Command { - config := defaultCleanConfig() - runCmdFunc := func(cmd *cobra.Command, commandLine []string) error { - args, _ := splitArgsAtDash(cmd, commandLine) + var config cleanConfig + runCmdFunc := func(cmd *cobra.Command, args []string) error { config.inputFilePath = args[0] config.outputFilePath = args[1] @@ -69,8 +68,8 @@ func makeCleanCommand() *cobra.Command { } command := &cobra.Command{ Use: "clean ", - Short: "remove noisy logs from the benchmark output and dump it to a file", - Long: `remove noisy logs from the benchmark output and dump it to a file`, + Short: "Summarise the benchmark output from the input file and write the summary to the output file", + Long: `Summarise the benchmark output from the input file and write the summary to the output file`, Args: cobra.ExactArgs(2), RunE: runCmdFunc, }