private void PopulateRunLevelData(DataAggregatorResult result, SlotModel slotModel) { slotModel.Arguments = result.Arguments; slotModel.ClientVersion = result.ClientVersion; slotModel.UserId = result.UserID; slotModel.MachineId = result.MachineID; //slotModel.TotalRunCompletedUnits = run.CompletedUnits; //slotModel.TotalRunFailedUnits = run.FailedUnits; //slotModel.TotalCompletedUnits = run.TotalCompletedUnits; if (UnitInfoDatabase.Connected) { slotModel.TotalRunCompletedUnits = (int)UnitInfoDatabase.Count(slotModel.Name, CountType.Completed, result.StartTime); slotModel.TotalCompletedUnits = (int)UnitInfoDatabase.Count(slotModel.Name, CountType.Completed); slotModel.TotalRunFailedUnits = (int)UnitInfoDatabase.Count(slotModel.Name, CountType.Failed, result.StartTime); slotModel.TotalFailedUnits = (int)UnitInfoDatabase.Count(slotModel.Name, CountType.Failed); } }
private void PopulateRunLevelData(DataAggregatorResult result, Info info, SlotModel slotModel) { Debug.Assert(slotModel != null); if (info != null) { slotModel.ClientVersion = info.Build.Version; } //if (run != null) //{ // slotModel.TotalRunCompletedUnits = run.CompletedUnits; // slotModel.TotalRunFailedUnits = run.FailedUnits; //} if (UnitInfoDatabase.Connected) { slotModel.TotalRunCompletedUnits = (int)UnitInfoDatabase.Count(slotModel.Name, CountType.Completed, result.StartTime); slotModel.TotalCompletedUnits = (int)UnitInfoDatabase.Count(slotModel.Name, CountType.Completed); slotModel.TotalRunFailedUnits = (int)UnitInfoDatabase.Count(slotModel.Name, CountType.Failed, result.StartTime); slotModel.TotalFailedUnits = (int)UnitInfoDatabase.Count(slotModel.Name, CountType.Failed); } }