Skip to content

Commit

Permalink
feature: update benchtime time as 5s and add coodown sleep between runs
Browse files Browse the repository at this point in the history
  • Loading branch information
GokselKUCUKSAHIN committed Oct 28, 2024
1 parent 3b8bd4b commit a732d41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion benchmarks/runner/run_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func parseBenchmarkOutput(benchmarkOutput string) (*BenchmarkResult, error) {
}

func generateCommand(projectDirectory, testFilePath string) *exec.Cmd {
cmd := exec.Command("go", "test", "-bench=.", "-benchtime=1s", testFilePath)
cmd := exec.Command("go", "test", "-bench=.", "-benchtime=5s", testFilePath)
cmd.Dir = projectDirectory
return cmd
}
Expand Down Expand Up @@ -144,6 +144,7 @@ func main() {
fmt.Printf("Error running benchmark for %s. err: %s", testFile, err.Error())
}
results = append(results, result)
time.Sleep(5 * time.Second)
}
endTime := time.Now()
elapsedTime := endTime.Sub(startTime)
Expand Down

0 comments on commit a732d41

Please sign in to comment.