Class FaultLatency
- Namespace
- Kuestenlogik.Bowire.Mock.Chaos
- Assembly
- Kuestenlogik.Bowire.Mock.dll
Latency shape: fixed, uniform, normal
(Box-Muller), or exponential. Samples clamp to
[0, CapMs] so a fat tail can't hang a request forever.
public sealed class FaultLatency
- Inheritance
-
FaultLatency
- Inherited Members
Constructors
FaultLatency()
public FaultLatency()
Fields
CapMs
Hard ceiling on any sampled delay.
public const int CapMs = 120000
Field Value
Properties
Distribution
fixed | uniform | normal | exponential.
[JsonPropertyName("distribution")]
public string Distribution { get; init; }
Property Value
MaxMs
Upper bound for uniform, inclusive.
[JsonPropertyName("maxMs")]
public int MaxMs { get; init; }
Property Value
MeanMs
Mean for normal / exponential.
[JsonPropertyName("meanMs")]
public int MeanMs { get; init; }
Property Value
MinMs
Lower bound for uniform.
[JsonPropertyName("minMs")]
public int MinMs { get; init; }
Property Value
StdDevMs
Standard deviation for normal.
[JsonPropertyName("stdDevMs")]
public int StdDevMs { get; init; }
Property Value
ValueMs
Delay for fixed.
[JsonPropertyName("valueMs")]
public int ValueMs { get; init; }
Property Value
Methods
Describe()
Compact human description ("uniform 100-500ms").
public string Describe()
Returns
SampleMs(Func<double>)
Draw one delay from the configured distribution, clamped to
[0, CapMs]. uniform01 supplies
uniform doubles in [0,1) — production passes
NextDouble(), tests pass a canned sequence
for exact assertions.
public int SampleMs(Func<double> uniform01)