mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Reduce number of operations in Redis benchmark.
The redis benchmark has inconsistent data due to timeouts. In general, operations on a redis DB are pretty uniform WRT performance and having a large set of operations is not useful for regression checks. Add another test method with a smaller subset of operations and a filter in the buildkite pipeline files. PiperOrigin-RevId: 499574468
This commit is contained in:
committed by
gVisor bot
parent
f75c1470c9
commit
0926a58934
@@ -494,7 +494,7 @@ steps:
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=node BENCHMARKS_TARGETS=test/benchmarks/network:node_test
|
||||
- <<: *benchmarks
|
||||
label: ":redis: Redis benchmarks"
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=redis BENCHMARKS_TARGETS=test/benchmarks/database:redis_test BENCHMARKS_OPTIONS=-test.benchtime=15s
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=redis BENCHMARKS_TARGETS=test/benchmarks/database:redis_test BENCHMARKS_FILTER=BenchmarkRedis/operation
|
||||
- <<: *benchmarks
|
||||
label: ":ruby: Ruby benchmarks"
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=ruby BENCHMARKS_TARGETS=test/benchmarks/network:ruby_test
|
||||
|
||||
@@ -48,9 +48,18 @@ var operations []string = []string{
|
||||
"MSET",
|
||||
}
|
||||
|
||||
// BenchmarkRedis runs redis-benchmark against a redis instance and reports
|
||||
// BenchmarkAllRedisOperations runs redis-benchmark against a redis instance and reports
|
||||
// data in queries per second. Each is reported by named operation (e.g. LPUSH).
|
||||
func BenchmarkAllRedisOperations(b *testing.B) {
|
||||
doBenchmarkRedis(b, operations)
|
||||
}
|
||||
|
||||
// BenchmarkRedisDashboard runs a subset of redis benchmarks for the performance dashboard.
|
||||
func BenchmarkRedis(b *testing.B) {
|
||||
doBenchmarkRedis(b, []string{"SET", "LPUSH", "LRANGE_100"})
|
||||
}
|
||||
|
||||
func doBenchmarkRedis(b *testing.B, ops []string) {
|
||||
clientMachine, err := harness.GetMachine()
|
||||
if err != nil {
|
||||
b.Fatalf("failed to get machine: %v", err)
|
||||
@@ -84,7 +93,7 @@ func BenchmarkRedis(b *testing.B) {
|
||||
if err = harness.WaitUntilContainerServing(ctx, clientMachine, server, port); err != nil {
|
||||
b.Fatalf("failed to start redis with: %v", err)
|
||||
}
|
||||
for _, operation := range operations {
|
||||
for _, operation := range ops {
|
||||
param := tools.Parameter{
|
||||
Name: "operation",
|
||||
Value: operation,
|
||||
|
||||
Reference in New Issue
Block a user