summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Hawkins <[email protected]>2022-11-07 18:27:45 -0500
committerWill Hawkins <[email protected]>2022-11-07 18:30:47 -0500
commit715e074b068d98bdf466ed33e08a1f54b31c3d44 (patch)
treee99397cdb46ad61a52df87ff3b94be6cae99e8b5
parentd88338dcf0a53ef48eb0a8064da6e284395f5d29 (diff)
[Feature] Allow caller to define rampup interval for load generators.
-rw-r--r--rpm/rpm.go3
1 files changed, 2 insertions, 1 deletions
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++ {