Skip to content

Commit

Permalink
add a sleep and measure benchmark mem for scale down
Browse files Browse the repository at this point in the history
Signed-off-by: Arko Dasgupta <[email protected]>
  • Loading branch information
arkodg committed Oct 29, 2024
1 parent f5552a4 commit 675aed1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/benchmark/tests/scale_httproutes.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"context"
"fmt"
"testing"
"time"

"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/types"
Expand Down Expand Up @@ -98,6 +99,8 @@ var ScaleHTTPRoutes = suite.BenchmarkTest{
gatewayAddr := kubernetes.GatewayAndHTTPRoutesMustBeAccepted(t, bSuite.Client, bSuite.TimeoutConfig,
bSuite.ControllerName, kubernetes.NewGatewayRef(gatewayNN), routeNNs...)

// Add sleep to wait until watchable memory is updated
time.Sleep(10 * time.Second)
// Run benchmark test at different scale.
name := fmt.Sprintf("scale-down-httproutes-%d", scale)
report, err := bSuite.Benchmark(t, ctx, name, gatewayAddr, requestHeaders...)
Expand Down

0 comments on commit 675aed1

Please sign in to comment.