| PhiAccrualFailureDetector Constructor (Double, Int32, TimeSpan, TimeSpan, TimeSpan, Clock) |
Procedural constructor for PhiAccrualDetector
Namespace:
Akka.Remote
Assembly:
Akka.Remote (in Akka.Remote.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax public PhiAccrualFailureDetector(
double threshold,
int maxSampleSize,
TimeSpan minStdDeviation,
TimeSpan acceptableHeartbeatPause,
TimeSpan firstHeartbeatEstimate,
Clock clock = null
)
new :
threshold : float *
maxSampleSize : int *
minStdDeviation : TimeSpan *
acceptableHeartbeatPause : TimeSpan *
firstHeartbeatEstimate : TimeSpan *
?clock : Clock
(* Defaults:
let _clock = defaultArg clock null
*)
-> PhiAccrualFailureDetector
Parameters
- threshold
- Type: SystemDouble
A low threshold is prone to generate many wrong suspicions but ensures a quick detection in the event
of a real crash. Conversely, a high threshold generates fewer mistakes but needs more time to detect actual crashes - maxSampleSize
- Type: SystemInt32
Number of samples to use for calculation of mean and standard deviation of inter-arrival times. - minStdDeviation
- Type: SystemTimeSpan
Minimum standard deviation to use for the normal distribution used when calculating phi.
Too low standard deviation might result in too much sensitivity for sudden, but normal, deviations
in heartbeat inter arrival times. - acceptableHeartbeatPause
- Type: SystemTimeSpan
Duration corresponding to number of potentially lost/delayed
heartbeats that will be accepted before considering it to be an anomaly.
This margin is important to be able to survive sudden, occasional, pauses in heartbeat
arrivals, due to for example garbage collect or network drop. - firstHeartbeatEstimate
- Type: SystemTimeSpan
Bootstrap the stats with heartbeats that corresponds to
to this duration, with a with rather high standard deviation (since environment is unknown
in the beginning) - clock (Optional)
- Type: Akka.RemoteClock
The clock, returning current time in milliseconds, but can be faked for testing
purposes. It is only used for measuring intervals (duration).
See Also