public void SetUp() { _performanceStatisticsProvider = Substitute.For <IPerformanceStatisticsProvider>(); _systemExecutionTime1 = new SystemExecutionTime(SystemName1, TimeSpan.FromMilliseconds(8), 0.1); _systemExecutionTime2 = new SystemExecutionTime(SystemName2, TimeSpan.FromMilliseconds(16), 0.2); _systemExecutionTime3 = new SystemExecutionTime(SystemName3, TimeSpan.FromMilliseconds(33), 0.3); _performanceStatisticsProvider.GetSystemsExecutionTime().Returns(new[] { _systemExecutionTime1, _systemExecutionTime2, _systemExecutionTime3 }); }
private IEnumerable <DiagnosticInfo> GetSystemsExecutionTimesDiagnosticInfo() { return(_performanceStatisticsProvider.GetSystemsExecutionTime() .Select(t => new DiagnosticInfo(t.SystemName, $"{t.AvgFrameTime} [{Math.Round(t.AvgFrameTimeShare * 100)}%]"))); }