From 715e074b068d98bdf466ed33e08a1f54b31c3d44 Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Mon, 7 Nov 2022 18:27:45 -0500 Subject: [Feature] Allow caller to define rampup interval for load generators. --- rpm/rpm.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rpm') diff --git a/rpm/rpm.go b/rpm/rpm.go index c5fcb8d..dfc48a3 100644 --- a/rpm/rpm.go +++ b/rpm/rpm.go @@ -319,6 +319,7 @@ func LoadGenerator( networkActivityCtx context.Context, // Create all network connections in this context. saturationCtx context.Context, // Continue logging, but stop adding flows when this context is canceled! loadGeneratorCtx context.Context, // Stop our activity when we no longer need to generate load. + rampupInterval time.Duration, lgcGenerator func() lgc.LoadGeneratingConnection, // Use this to generate a new load-generating connection. throughputDataLogger datalogger.DataLogger[ThroughputDataPoint], // For logging data! debugging *debug.DebugWithPrefix, // How can we forget debugging? @@ -353,7 +354,7 @@ func LoadGenerator( // the self probes use. Let's send it back to the caller so that they can pass it on if they need to. probeConnectionCommunicationChannel <- lgcs[0] - nextSampleStartTime := time.Now().Add(time.Second) + nextSampleStartTime := time.Now().Add(rampupInterval) for currentInterval := uint64(0); true; currentInterval++ { -- cgit v1.2.3