public void call() { var stopWatch = new System.Diagnostics.Stopwatch(); stopWatch.Start(); _Delegate(); stopWatch.Stop(); timing.AddDatum(stopWatch.ElapsedMilliseconds); if (logStats) { int average = (int)timing.GetAverage(); log.Info("Average time per recommendation: {}ms", average); long memory = GC.GetTotalMemory(false); log.Info("Approximate memory used: {}MB", memory / 1000000L); log.Info("Unable to recommend in {} cases", noEstimateCounter.get()); } }
public double GetAverage() { return(-_Delegate.GetAverage()); }