Language
C#
Article For
4.1 4.2 5.1 5.2 5.3

Operations: How to Get Detailed Database Statistics

GetDetailedStatisticsOperation will retrieve the same database statistics as GetStatisticsOperation plus total count of identities and counters.

Syntax

public GetDetailedStatisticsOperation();
Return Value
DetailedDatabaseStatistics Detailed database statistics

Example

DetailedDatabaseStatistics stats
    = store.maintenance().send(new GetDetailedStatisticsOperation());
long countOfDocuments = stats.getCountOfDocuments();
int countOfIndexes = stats.getCountOfIndexes();
long countOfCompareExchange = stats.getCountOfCompareExchange();
long countOfIdentities = stats.getCountOfIdentities();
boolean stale = stats.getIndexes()[0].isStale();