diff --git a/arangod/RocksDBEngine/RocksDBEngine.cpp b/arangod/RocksDBEngine/RocksDBEngine.cpp index 91b2c7d65a..afaaf543df 100644 --- a/arangod/RocksDBEngine/RocksDBEngine.cpp +++ b/arangod/RocksDBEngine/RocksDBEngine.cpp @@ -1913,8 +1913,9 @@ void RocksDBEngine::getStatistics(VPackBuilder& builder) const { auto rates = manager->globalHitRates(); builder.add("cache.limit", VPackValue(manager->globalLimit())); builder.add("cache.allocated", VPackValue(manager->globalAllocation())); - builder.add("cache.hit-rate-lifetime", VPackValue(rates.first)); - builder.add("cache.hit-rate-recent", VPackValue(rates.second)); + // handle NaN + builder.add("cache.hit-rate-lifetime", VPackValue(rates.first >= 0.0 ? rates.first : 0.0)); + builder.add("cache.hit-rate-recent", VPackValue(rates.second >= 0.0 ? rates.second : 0.0)); // print column family statistics builder.add("columnFamilies", VPackValue(VPackValueType::Object));