-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix #3329 Add Adaptive selection statistics to NodeStats * add ingest statistics
- Loading branch information
Showing
6 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Nest | ||
{ | ||
[JsonObject] | ||
public class AdaptiveSelectionStats | ||
{ | ||
/// <summary> | ||
/// The number of outstanding search requests from the node these stats are for to the keyed node. | ||
/// </summary> | ||
[JsonProperty("outgoing_searches")] | ||
public long OutgoingSearches { get; internal set; } | ||
|
||
/// <summary> | ||
/// The exponentially weighted moving average queue size of search requests on the keyed node. | ||
/// </summary> | ||
[JsonProperty("avg_queue_size")] | ||
public long AverageQueueSize { get; internal set; } | ||
|
||
/// <summary> | ||
/// The exponentially weighted moving average service time of search requests on the keyed node. | ||
/// </summary> | ||
/// <remarks>only set when requesting human readable response</remarks> | ||
[JsonProperty("avg_service_time")] | ||
public string AverageServiceTime { get; internal set; } | ||
|
||
/// <summary> | ||
/// The exponentially weighted moving average service time of search requests on the keyed node. | ||
/// </summary> | ||
[JsonProperty("avg_service_time_ns")] | ||
public long AverageServiceTimeInNanoseconds { get; internal set; } | ||
|
||
/// <summary> | ||
/// The exponentially weighted moving average response time of search requests on the keyed node. | ||
/// </summary> | ||
/// <remarks>only set when requesting human readable response</remarks> | ||
[JsonProperty("avg_response_time")] | ||
public long AverageResponseTime { get; internal set; } | ||
|
||
/// <summary> | ||
/// The exponentially weighted moving average response time of search requests on the keyed node. | ||
/// </summary> | ||
[JsonProperty("avg_response_time_ns")] | ||
public long AverageResponseTimeInNanoseconds { get; internal set; } | ||
|
||
/// <summary> | ||
/// The rank of this node; used for shard selection when routing search requests. | ||
/// </summary> | ||
[JsonProperty("rank")] | ||
public string Rank { get; internal set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Nest | ||
{ | ||
[JsonObject] | ||
public class IngestStats | ||
{ | ||
/// <summary> | ||
/// The total number of document ingested during the lifetime of this node | ||
/// </summary> | ||
[JsonProperty("count")] | ||
public long Count { get; set; } | ||
|
||
/// <summary> | ||
/// The total time spent on ingest preprocessing documents during the lifetime of this node | ||
/// </summary> | ||
[JsonProperty("time_in_millis")] | ||
public long TimeInMilliseconds { get; set; } | ||
|
||
/// <summary> | ||
/// The total number of documents currently being ingested. | ||
/// </summary> | ||
[JsonProperty("current")] | ||
public long Current { get; set; } | ||
|
||
/// <summary> | ||
/// The total number ingest preprocessing operations failed during the lifetime of this node | ||
/// </summary> | ||
[JsonProperty("failed")] | ||
public long Failed { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Nest | ||
{ | ||
public class NodeIngestStats | ||
{ | ||
/// <summary> Overal global ingest statistics </summary> | ||
[JsonProperty("total")] | ||
public IngestStats Total { get; set; } | ||
|
||
/// <summary> Per pipeline ingest statistics </summary> | ||
[JsonProperty("pipelines")] | ||
[JsonConverter(typeof(VerbatimDictionaryKeysJsonConverter<string, IngestStats>))] | ||
public IReadOnlyDictionary<string, IngestStats> Pipelines { get; internal set; } | ||
= EmptyReadOnly<string, IngestStats>.Dictionary; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters