Skip to content

Instantly share code, notes, and snippets.

@rueian
Created March 2, 2025 05:22
Show Gist options
  • Save rueian/f86bf4a4bf682989478b666352e886d4 to your computer and use it in GitHub Desktop.
Save rueian/f86bf4a4bf682989478b666352e886d4 to your computer and use it in GitHub Desktop.
package glide
import (
"context"
"testing"
"github.com/valkey-io/valkey-glide/go/api"
)
func BenchmarkGlide(b *testing.B) {
config := api.NewGlideClientConfiguration().WithAddress(&api.NodeAddress{Host: "127.0.0.1", Port: 6379})
client, err := api.NewGlideClient(config)
if err != nil {
b.Fatal()
}
defer client.Close()
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
_, _ = client.Get("key")
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment