Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Go benchmarking #171

Closed

Conversation

aaron-congo
Copy link

To run:

cd go/benchmarks
go run . -resultsFile gobenchmarks.json -dataSize "100 1000" -concurrentTasks "10 100" -clients all -host localhost -port 6379 -clientCount "1 5" -tls

Copy link

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Please update benchmarking script
  2. Add minimal benchmark to CI (see how java does)

go/api/base_client.go Outdated Show resolved Hide resolved
return results
}

func average(observations []time.Duration) time.Duration {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a 3rd party go lib to calc stddev, avg and percentile?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to find one

var jsonResults []map[string]interface{}

func writeResults(file *os.File) error {
encoder := json.NewEncoder(file)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do this extend existing file or overwrite it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overwrite

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should extend, because benchmarking script calls bencmarking app multiple time with different parameters

go/benchmarks/benchmarking.go Show resolved Hide resolved
go/benchmarks/glide_benchmark_client.go Show resolved Hide resolved
go/benchmarks/main.go Show resolved Hide resolved
Comment on lines +55 to +58
for _, clientName := range runConfig.clientNames {
for _, numConcurrentTasks := range runConfig.concurrentTasks {
for _, clientCount := range runConfig.clientCount {
for _, dataSize := range runConfig.dataSize {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy cow

@jonathanl-bq
Copy link

I tried checking out your branch and running the benchmarks locally, but I got this error:

go: downloading go1.22 (darwin/amd64)
go: download go1.22 for darwin/amd64: toolchain not available

I also think the instructions for running the benchmarks should probably be documented somewhere (DEVELOPER.md?)

@aaron-congo aaron-congo deleted the go/dev_acongo_benchmarks branch April 19, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants