|
1 | | -using Newtonsoft.Json; |
| 1 | +using System.Collections.Generic; |
| 2 | +using Newtonsoft.Json; |
2 | 3 |
|
3 | 4 | namespace Nest |
4 | 5 | { |
@@ -49,5 +50,60 @@ public class JobStats |
49 | 50 | /// </summary> |
50 | 51 | [JsonProperty("state")] |
51 | 52 | public JobState State { get; internal set; } |
| 53 | + |
| 54 | + /// <summary> |
| 55 | + /// Contains job statistics if job contains a forecast. |
| 56 | + /// </summary> |
| 57 | + [JsonProperty("forecasts_stats")] |
| 58 | + public JobForecastStatistics Forecasts { get; internal set; } |
| 59 | + } |
| 60 | + |
| 61 | + public class JobForecastStatistics |
| 62 | + { |
| 63 | + /// <summary> |
| 64 | + /// The number of forecasts currently available for this model. |
| 65 | + /// </summary> |
| 66 | + [JsonProperty("total")] |
| 67 | + public long Total { get; internal set; } |
| 68 | + |
| 69 | + /// <summary> |
| 70 | + /// Statistics about the memory usage: minimum, maximum, average and total. |
| 71 | + /// </summary> |
| 72 | + [JsonProperty("memory_bytes")] |
| 73 | + public JobStatistics MemoryBytes { get; internal set; } |
| 74 | + |
| 75 | + /// <summary> |
| 76 | + /// Statistics about the forecast runtime in milliseconds: minimum, maximum, average and total. |
| 77 | + /// </summary> |
| 78 | + [JsonProperty("processing_time_ms")] |
| 79 | + public JobStatistics ProcessingTimeMilliseconds { get; internal set; } |
| 80 | + |
| 81 | + /// <summary> |
| 82 | + /// Statistics about the number of forecast records: minimum, maximum, average and total. |
| 83 | + /// </summary> |
| 84 | + [JsonProperty("records")] |
| 85 | + public JobStatistics Records { get; internal set; } |
| 86 | + |
| 87 | + /// <summary> |
| 88 | + /// Counts per forecast status. |
| 89 | + /// </summary> |
| 90 | + [JsonProperty("status")] |
| 91 | + public IReadOnlyDictionary<string, long> Status { get; internal set; } |
| 92 | + = EmptyReadOnly<string, long>.Dictionary; |
| 93 | + |
| 94 | + public class JobStatistics |
| 95 | + { |
| 96 | + [JsonProperty("avg")] |
| 97 | + public double Average { get; internal set; } |
| 98 | + |
| 99 | + [JsonProperty("max")] |
| 100 | + public double Maximum { get; internal set; } |
| 101 | + |
| 102 | + [JsonProperty("min")] |
| 103 | + public double Minimum { get; internal set; } |
| 104 | + |
| 105 | + [JsonProperty("total")] |
| 106 | + public double Total { get; internal set; } |
| 107 | + } |
52 | 108 | } |
53 | 109 | } |
0 commit comments