summaryrefslogtreecommitdiff
path: root/constants/constants.go
diff options
context:
space:
mode:
authorWill Hawkins <[email protected]>2022-11-07 18:29:03 -0500
committerWill Hawkins <[email protected]>2022-11-07 18:32:01 -0500
commit86f822c37f8fcc70d3a1085f4769ec58752f50c1 (patch)
tree5f1a1e070590d5669b0c36eab1faaba99e4478af /constants/constants.go
parent715e074b068d98bdf466ed33e08a1f54b31c3d44 (diff)
[Feature] Redefine stability
Stability (in rev3) is based on whether the standard deviations of the measurements are within a certain percentage of the average. This commit adds that functionality.
Diffstat (limited to 'constants/constants.go')
-rw-r--r--constants/constants.go26
1 files changed, 15 insertions, 11 deletions
diff --git a/constants/constants.go b/constants/constants.go
index c4f2c20..6934459 100644
--- a/constants/constants.go
+++ b/constants/constants.go
@@ -17,17 +17,21 @@ package constants
import "time"
var (
- // The initial number of connections on a LBC.
- StartingNumberOfLoadGeneratingConnections uint64 = 4
- // The number of intervals for which to account in a moving-average
- // calculation.
- MovingAverageIntervalCount int = 4
- // The number of intervals across which to consider a moving average stable.
- MovingAverageStabilitySpan uint64 = 4
- // The number of connections to add to a LBC when unsaturated.
- AdditiveNumberOfLoadGeneratingConnections uint64 = 4
- // The cutoff of the percent difference that defines instability.
- InstabilityDelta float64 = 5
+ // The initial number of load-generating connections when attempting to saturate the network.
+ StartingNumberOfLoadGeneratingConnections uint64 = 1
+ // The number of load-generating connections to add at each interval while attempting to
+ // saturate the network.
+ AdditiveNumberOfLoadGeneratingConnections uint64 = 1
+
+ // The number of previous instantaneous measurements to consider when generating the so-called
+ // instantaneous moving averages of a measurement.
+ InstantaneousThroughputMeasurementCount int = 4
+ InstantaneousProbeMeasurementCount int = 1
+ // The number of instantaneous moving averages to consider when determining stability.
+ InstantaneousMovingAverageCount int = 4
+ // The standard deviation cutoff used to determine stability among the K preceding moving averages
+ // of a measurement (as a percentage of the mean).
+ StabilityStandardDeviation float64 = 5.0
// The amount of time that the client will cooldown if it is in debug mode.
CooldownPeriod time.Duration = 4 * time.Second