use of org.sonar.server.es.response.IndexStats in project sonarqube by SonarSource.
the class EsIndexesSection method completeIndexAttributes.
private void completeIndexAttributes(ProtobufSystemInfo.Section.Builder protobuf) {
IndicesStatsResponse indicesStats = esClient.indicesStats();
for (IndexStats indexStats : indicesStats.getAllIndexStats()) {
String prefix = "Index " + indexStats.getName() + " - ";
setAttribute(protobuf, prefix + "Docs", indexStats.getDocCount());
setAttribute(protobuf, prefix + "Shards", indexStats.getShardsCount());
setAttribute(protobuf, prefix + "Store Size", humanReadableByteCountSI(indexStats.getStoreSizeBytes()));
}
}
Aggregations