Add `queries` to XContent output of PercolateStats

The queries stats tracked but not exposed to the Rest API

Closes #4440
This commit is contained in:
Boaz Leskes 2013-12-13 11:36:51 +01:00
parent b65d07b495
commit 2acccf257d
1 changed files with 2 additions and 0 deletions

View File

@ -93,6 +93,7 @@ public class PercolateStats implements Streamable, ToXContent {
builder.field(Fields.CURRENT, current);
builder.field(Fields.MEMORY_SIZE_IN_BYTES, memorySizeInBytes);
builder.field(Fields.MEMORY_SIZE, getMemorySize());
builder.field(Fields.QUERIES, getNumQueries());
builder.endObject();
return builder;
}
@ -117,6 +118,7 @@ public class PercolateStats implements Streamable, ToXContent {
static final XContentBuilderString CURRENT = new XContentBuilderString("current");
static final XContentBuilderString MEMORY_SIZE_IN_BYTES = new XContentBuilderString("memory_size_in_bytes");
static final XContentBuilderString MEMORY_SIZE = new XContentBuilderString("memory_size");
static final XContentBuilderString QUERIES = new XContentBuilderString("queries");
}
public static PercolateStats readPercolateStats(StreamInput in) throws IOException {