public void RecordLatency(long latency) { var index = latency / LatencyStep; var upperBound = (index + 1) * LatencyStep; if (upperBound <= LatencyMax) { _statistics.AddOrUpdate(SignalRUtils.MessageLessThan(upperBound), 1, (k, v) => v + 1); } else { _statistics.AddOrUpdate(SignalRUtils.MessageGreaterOrEqualTo(LatencyMax), 1, (k, v) => v + 1); } }