Created
March 2, 2025 05:22
-
-
Save rueian/f86bf4a4bf682989478b666352e886d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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