Skip to content

Commit

Permalink
Merge pull request #7496 from dolthub/db/fix-benchmark
Browse files Browse the repository at this point in the history
[no-release-notes] /go/performance/utils/benchmark_runner/{sysbench,tpcc}.go: fix output already set error
  • Loading branch information
coffeegoddd authored Feb 14, 2024
2 parents 4849f99 + 2275eba commit 27f37ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go/performance/utils/benchmark_runner/sysbench.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (t *sysbenchTesterImpl) run(ctx context.Context) (*Result, error) {
}

func (t *sysbenchTesterImpl) cleanup(ctx context.Context) error {
cmd := ExecCommand(ctx, sysbenchCommand, t.test.GetCleanupArgs(t.serverConfig)...)
cmd := exec.CommandContext(ctx, sysbenchCommand, t.test.GetCleanupArgs(t.serverConfig)...)
if t.test.GetFromScript() {
lp := filepath.Join(t.config.GetScriptDir(), luaPath)
cmd.Env = os.Environ()
Expand Down
6 changes: 3 additions & 3 deletions go/performance/utils/benchmark_runner/tpcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (t *tpccTesterImpl) outputToResult(output []byte) (*Result, error) {

func (t *tpccTesterImpl) prepare(ctx context.Context) error {
args := t.test.GetPrepareArgs(t.serverConfig)
cmd := ExecCommand(ctx, t.tpccCommand, args...)
cmd := exec.CommandContext(ctx, t.tpccCommand, args...)
cmd = t.updateCmdEnv(cmd)
out, err := cmd.Output()
if err != nil {
Expand All @@ -65,7 +65,7 @@ func (t *tpccTesterImpl) prepare(ctx context.Context) error {

func (t *tpccTesterImpl) run(ctx context.Context) (*Result, error) {
args := t.test.GetRunArgs(t.serverConfig)
cmd := ExecCommand(ctx, t.tpccCommand, args...)
cmd := exec.CommandContext(ctx, t.tpccCommand, args...)
cmd = t.updateCmdEnv(cmd)

out, err := cmd.Output()
Expand All @@ -90,7 +90,7 @@ func (t *tpccTesterImpl) run(ctx context.Context) (*Result, error) {

func (t *tpccTesterImpl) cleanup(ctx context.Context) error {
args := t.test.GetCleanupArgs(t.serverConfig)
cmd := ExecCommand(ctx, t.tpccCommand, args...)
cmd := exec.CommandContext(ctx, t.tpccCommand, args...)
cmd = t.updateCmdEnv(cmd)
err := cmd.Run()
if err != nil {
Expand Down

0 comments on commit 27f37ad

Please sign in to comment.