public void InitMeanCounters(IEnumerable <string> CounterNames) { foreach (string CounterName in CounterNames) { if (!MeanCounters.ContainsKey(CounterName)) { MeanCounters.Add(CounterName, new StatusReportingMeanCounter()); } } }
public void AddToMeanCounter(string CountName, int Millisec) { lock (DataLock) { if (!MeanCounters.ContainsKey(CountName)) { MeanCounters.Add(CountName, new StatusReportingMeanCounter()); } MeanCounters[CountName].TotalMillisec += Millisec; MeanCounters[CountName].SampleCount++; } }