private Second GetItem(int elapsed) { if (Seconds.ContainsKey(elapsed)) return Seconds[elapsed]; var second = new Second(elapsed); Seconds.Add(elapsed, second); return second; }
public void AddMerged(Second second) { Count += second.Count; Bytes += second.Bytes; foreach (var statusCode in second.StatusCodes) { if (StatusCodes.ContainsKey(statusCode.Key)) StatusCodes[statusCode.Key] += statusCode.Value; else StatusCodes.Add(statusCode.Key, statusCode.Value); } foreach (var exception in second.Exceptions) { if (Exceptions.ContainsKey(exception.Key)) Exceptions[exception.Key] += exception.Value; else Exceptions.Add(exception.Key, exception.Value); } }
public void AddMerged(Second second) { Count += second.Count; Bytes += second.Bytes; Errors += second.Errors; }