/// <summary> /// Initializes a new instance of the <see cref="HitRatioGauge" /> class. /// </summary> /// <param name="hitMeter">The numerator meter to use for the ratio.</param> /// <param name="totalTimer">The denominator timer to use for the ratio.</param> /// <param name="meterRateFunc"> /// The function to extract a value from the MeterValue. Will be applied to both the numerator /// and denominator meters. /// </param> /// <remarks> /// Creates a new HitRatioGauge with externally tracked Meter and Timer, and uses the provided meter rate function to /// extract the value for the ratio. /// </remarks> public HitRatioGauge(IMeter hitMeter, ITimer totalTimer, Func <MeterValue, double> meterRateFunc) : base(() => meterRateFunc(hitMeter.GetValueOrDefault()), () => meterRateFunc(totalTimer.GetValueOrDefault().Rate)) { }