diff --git a/src/Nest/Cat/CatThreadPool/CatThreadPoolRecord.cs b/src/Nest/Cat/CatThreadPool/CatThreadPoolRecord.cs index 923f6c77d2a..5374df2eda4 100644 --- a/src/Nest/Cat/CatThreadPool/CatThreadPoolRecord.cs +++ b/src/Nest/Cat/CatThreadPool/CatThreadPoolRecord.cs @@ -6,74 +6,136 @@ namespace Nest [DataContract] public class CatThreadPoolRecord : ICatRecord { - [DataMember(Name ="active")] - [JsonFormatter(typeof(StringIntFormatter))] - public int Active { get; set; } + /// + /// The number of active threads in the current thread pool + /// + [DataMember(Name = "active")] + [JsonFormatter(typeof(StringLongFormatter))] + public long Active { get; set; } - [DataMember(Name ="completed")] + /// + /// The number of tasks completed by the thread pool executor + /// + [DataMember(Name = "completed")] [JsonFormatter(typeof(NullableStringLongFormatter))] public long? Completed { get; set; } - [DataMember(Name ="ephemeral_node_id")] + /// + /// The configured core number of active threads allowed in the current thread pool + /// + [DataMember(Name = "core")] + [JsonFormatter(typeof(NullableStringIntFormatter))] + public int? Core { get; set; } + + /// + /// The ephemeral node ID + /// + [DataMember(Name = "ephemeral_node_id")] public string EphemeralNodeId { get; set; } - [DataMember(Name ="host")] + /// + /// The hostname for the current node + /// + [DataMember(Name = "host")] public string Host { get; set; } - [DataMember(Name ="ip")] + /// + /// The IP address for the current node + /// + [DataMember(Name = "ip")] public string Ip { get; set; } - [DataMember(Name ="keep_alive")] + /// + /// The configured keep alive time for threads + /// + [DataMember(Name = "keep_alive")] public Time KeepAlive { get; set; } - [DataMember(Name ="largest")] + /// + /// The highest number of active threads in the current thread pool + /// + [DataMember(Name = "largest")] [JsonFormatter(typeof(NullableStringIntFormatter))] public int? Largest { get; set; } - //TODO: This is now often reported back as null since 7.x (investigate) - [DataMember(Name ="max")] + /// + /// The configured maximum number of active threads allowed in the current thread pool + /// + [DataMember(Name = "max")] [JsonFormatter(typeof(NullableStringIntFormatter))] public int? Maximum { get; set; } - //TODO: this appears to no longer be reported - [DataMember(Name ="min")] - [JsonFormatter(typeof(NullableStringIntFormatter))] - public int? Minimum { get; set; } - - [DataMember(Name ="name")] + /// + /// The name of the thread pool + /// + [DataMember(Name = "name")] public string Name { get; set; } - [DataMember(Name ="node_id")] + /// + /// The unique id of the node + /// + [DataMember(Name = "node_id")] public string NodeId { get; set; } - [DataMember(Name ="node_name")] + /// + /// The name of the node + /// + [DataMember(Name = "node_name")] public string NodeName { get; set; } - [DataMember(Name ="port")] + /// + /// The number of threads in the current thread pool + /// + [DataMember(Name = "pool_size")] + [JsonFormatter(typeof(NullableStringIntFormatter))] + public int? PoolSize { get; set; } + + /// + /// The bound transport port for the current node + /// + [DataMember(Name = "port")] [JsonFormatter(typeof(NullableStringIntFormatter))] public int? Port { get; set; } - [DataMember(Name ="pid")] + /// + /// The process ID of the running node + /// + [DataMember(Name = "pid")] [JsonFormatter(typeof(NullableStringIntFormatter))] public int? ProcessId { get; set; } - [DataMember(Name ="queue")] - [JsonFormatter(typeof(StringIntFormatter))] - public int Queue { get; set; } + /// + /// The number of tasks in the queue for the current thread pool + /// + [DataMember(Name = "queue")] + [JsonFormatter(typeof(StringLongFormatter))] + public long Queue { get; set; } - [DataMember(Name ="queue_size")] + /// + /// The maximum number of tasks permitted in the queue for the current thread pool + /// + [DataMember(Name = "queue_size")] [JsonFormatter(typeof(NullableStringIntFormatter))] public int? QueueSize { get; set; } - [DataMember(Name ="rejected")] + /// + /// The number of tasks rejected by the thread pool executor + /// + [DataMember(Name = "rejected")] [JsonFormatter(typeof(StringLongFormatter))] public long Rejected { get; set; } - [DataMember(Name ="size")] + /// + /// The configured fixed number of active threads allowed in the current thread pool + /// + [DataMember(Name = "size")] [JsonFormatter(typeof(NullableStringIntFormatter))] public int? Size { get; set; } - [DataMember(Name ="type")] + /// + /// The current (*) type of thread pool (`fixed` or `scaling`) + /// + [DataMember(Name = "type")] public string Type { get; set; } } } diff --git a/src/Tests/Tests/Cat/CatThreadPool/CatThreadpoolApiTests.cs b/src/Tests/Tests/Cat/CatThreadPool/CatThreadpoolApiTests.cs index 8ac4a63a1a2..27312780218 100644 --- a/src/Tests/Tests/Cat/CatThreadPool/CatThreadpoolApiTests.cs +++ b/src/Tests/Tests/Cat/CatThreadPool/CatThreadpoolApiTests.cs @@ -57,7 +57,6 @@ protected override void ExpectResponse(CatResponse response { response.Records.Should().NotBeNull(); - foreach (var r in response.Records) { r.EphemeralNodeId.Should().NotBeNullOrWhiteSpace();