Java Code Examples for org.elasticsearch.index.indexing.IndexingStats#Stats

The following examples show how to use org.elasticsearch.index.indexing.IndexingStats#Stats . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GraphiteReporter.java    From elasticsearch-graphite-plugin with Do What The F*ck You Want To Public License 5 votes vote down vote up
private void sendIndexingStats(String type, IndexingStats indexingStats) {
    IndexingStats.Stats totalStats = indexingStats.getTotal();
    sendStats(type + "._all", totalStats);

    Map<String, IndexingStats.Stats> typeStats = indexingStats.getTypeStats();
    if (typeStats != null) {
        for (Map.Entry<String, IndexingStats.Stats> statsEntry : typeStats.entrySet()) {
            sendStats(type + "." + statsEntry.getKey(), statsEntry.getValue());
        }
    }
}
 
Example 2
Source File: GraphiteReporter.java    From elasticsearch-graphite-plugin with Do What The F*ck You Want To Public License 5 votes vote down vote up
private void sendStats(String type, IndexingStats.Stats stats) {
    sendInt(type, "indexCount", stats.getIndexCount());
    sendInt(type, "indexTimeInMillis", stats.getIndexTimeInMillis());
    sendInt(type, "indexCurrent", stats.getIndexCount());
    sendInt(type, "deleteCount", stats.getDeleteCount());
    sendInt(type, "deleteTimeInMillis", stats.getDeleteTimeInMillis());
    sendInt(type, "deleteCurrent", stats.getDeleteCurrent());
}