Log both estimate and nack ratio when congestion detected (#608)

This commit is contained in:
Raja Subramanian
2022-04-10 12:09:11 +05:30
committed by GitHub
parent 69d9cc19bc
commit ee7bb0a1ad

View File

@@ -1620,12 +1620,14 @@ func (c *ChannelObserver) GetTrend() (ChannelTrend, ChannelCongestionReason) {
"channel observer: estimate is trending downward",
"name", c.params.Name,
"estimate", c.estimateTrend.ToString(),
"ratio", nackRatio,
)
return ChannelTrendCongesting, ChannelCongestionReasonEstimate
case c.params.NackWindowMinDuration != 0 && !c.nackWindowStartTime.IsZero() && time.Since(c.nackWindowStartTime) > c.params.NackWindowMinDuration && nackRatio > c.params.NackRatioThreshold:
c.logger.Debugw(
"channel observer: high rate of repeated NACKs",
"name", c.params.Name,
"estimate", c.estimateTrend.ToString(),
"ratio", nackRatio,
)
return ChannelTrendCongesting, ChannelCongestionReasonLoss