cs-codex-dist-tests/Tools/AutoClientCenter/Model.cs

61 lines
1.9 KiB
C#
Raw Normal View History

2024-09-11 10:08:06 +00:00
namespace AutoClientCenter
{
public class AcTasks
{
2024-09-11 12:00:22 +00:00
public int StartTaskEverySeconds { get; set; }
2024-09-11 10:08:06 +00:00
public AcTask[] Tasks { get; set; } = Array.Empty<AcTask>();
}
public class AcTask
{
public int ChanceWeight { get; set; }
public AcTaskStep[] Steps { get; set; } = Array.Empty<AcTaskStep>();
}
public class AcTaskStep
{
public string Id { get; set; } = string.Empty;
public AcUploadStep? UploadStep { get; set; }
public AcStoreStep? StoreStep { get; set; }
public AcDownloadStep? DownloadStep { get; set; }
public string? ResultErrorMsg { get; set; }
}
public class AcUploadStep
{
public long SizeInBytes { get; set; }
public string? ResultCid { get; set; }
}
public class AcStoreStep
{
public int ContractDurationMinutes { get; set; }
public int ContractExpiryMinutes { get; set; }
public int NumHosts { get; set; }
public int HostTolerance { get; set; }
public int Price { get; set; }
public int RequiredCollateral { get; set; }
public string? ResultPurchaseId { get; set; }
2024-09-11 12:00:22 +00:00
public string? ResultOriginalCid { get; set; }
public string? ResultEncodedCid { get; set; }
2024-09-11 10:08:06 +00:00
}
public class AcDownloadStep
{
2024-09-11 12:00:22 +00:00
public string Cid { get; set; } = string.Empty;
public long ResultDownloadTimeMilliseconds { get; set; }
2024-09-11 10:08:06 +00:00
}
public class AcStats
{
public DateTime ServiceStartUtc { get; set; } = DateTime.MinValue;
public int TotalUploads { get; set; }
public int TotalUploadsFailed { get; set; }
public int TotalDownloads { get; set; }
2024-09-11 12:00:22 +00:00
public long[] DownloadTimesMillisecondsPerKb { get; set; } = Array.Empty<long>();
2024-09-11 10:08:06 +00:00
public int TotalDownloadsFailed { get; set; }
public int TotalContractsStarted { get; set; }
2024-09-11 12:00:22 +00:00
public int TotalContractStartsFailed { get; set; }
2024-09-11 10:08:06 +00:00
}
}