public override void UpdateEta(PlottingStatistics stats) { this.TimeRemaining = 0; if (CurrentPhase == 6) { this.TimeRemaining = 0; } if (CurrentPhase <= 5) { float factor = 1; if (CurrentPhase == 5) { // TODO: if more can be known } this.TimeRemaining += (int)(factor * (float)stats.CopyTimeAvgTimeNeed); } if (CurrentPhase <= 4) { float factor = 1; if (CurrentPhase == 4) { factor = (float)this.CurrentPhasePart / CPPlotLog.P4PARTS; } this.TimeRemaining += (int)(factor * stats.Phase4AvgTimeNeed); } if (CurrentPhase <= 3) { float factor = 1; if (CurrentPhase == 3) { factor = (float)this.CurrentPhasePart / CPPlotLog.P3PARTS; } this.TimeRemaining += (int)(factor * stats.Phase3AvgTimeNeed); } if (CurrentPhase <= 2) { float factor = 1; if (CurrentPhase == 2) { factor = (float)this.CurrentPhasePart / CPPlotLog.P2PARTS; } this.TimeRemaining += (int)(factor * stats.Phase2AvgTimeNeed); } if (CurrentPhase == 1) { var factor = (float)this.CurrentPhasePart / CPPlotLog.P1PARTS; this.TimeRemaining += (int)(factor * stats.Phase2AvgTimeNeed); } if (this.TimeRemaining > 0) { DateTime dt = DateTime.Now; dt = dt.AddSeconds(this.TimeRemaining); this.ETA = dt; } else { this.ETA = null; } }
public PlottingStatisticsFull(PlottingStatisticsID id, PlottingStatistics stats) { this.LogFolder = id.LogFolder; this.Tmp1Drive = id.Tmp1Drive; this.Tmp2Drive = id.Tmp2Drive; this.PlotSize = id.PlotSize; this.Threads = id.Threads; this.Buffer = id.Buffer; this.Buckets = id.Buckets; this.Phase1AvgTimeNeed = stats.Phase1AvgTimeNeed; this.Phase1Completed = stats.Phase1Completed; this.Phase2AvgTimeNeed = stats.Phase2AvgTimeNeed; this.Phase2Completed = stats.Phase2Completed; this.Phase3AvgTimeNeed = stats.Phase3AvgTimeNeed; this.Phase3Completed = stats.Phase3Completed; this.Phase4AvgTimeNeed = stats.Phase4AvgTimeNeed; this.Phase4Completed = stats.Phase4Completed; this.CopyTimeAvgTimeNeed = stats.CopyTimeAvgTimeNeed; this.CopyTimeCompleted = stats.CopyTimeCompleted; this.TotalAvgTimeNeed = stats.Phase1AvgTimeNeed + stats.Phase2AvgTimeNeed + stats.Phase3AvgTimeNeed + stats.Phase4AvgTimeNeed + stats.CopyTimeAvgTimeNeed; }
public override void UpdateHealth(PlottingStatistics stats) { // TODO base.UpdateHealth(stats); }