Skip to content

Commit

Permalink
Merge #126884
Browse files Browse the repository at this point in the history
126884: roachprod-microbench: address review comments in clean command r=renatolabs a=sambhav-jain-16

There were post-review comments in #126810. This change aims to address those.

Epic: none

Release note: None

Co-authored-by: Sambhav Jain <[email protected]>
  • Loading branch information
craig[bot] and sambhav-jain-16 committed Jul 16, 2024
2 parents 73ecc8b + 4e29fe1 commit 34290f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
7 changes: 0 additions & 7 deletions pkg/cmd/roachprod-microbench/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 4 additions & 5 deletions pkg/cmd/roachprod-microbench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -69,8 +68,8 @@ func makeCleanCommand() *cobra.Command {
}
command := &cobra.Command{
Use: "clean <inputFilePath> <outputFilePath>",
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,
}
Expand Down

0 comments on commit 34290f5

Please sign in to comment.