using System.ComponentModel.DataAnnotations.Schema;
namespace EgwControlCenter.Core
{
///
/// Statistiche esecuzione task
///
public class TaskStat
{
///
/// num di esecuzioni registrate
///
public long NumRun { get; set; } = 1;
///
/// Tempo totale registrato
///
public TimeSpan TotalTime { get; set; } = new TimeSpan();
///
/// Timespan medio esecuzione
///
[NotMapped]
public TimeSpan AvgTime
{
get => TotalTime / (NumRun > 1 ? NumRun : 1);
}
}
}