mirror of https://gitee.com/bigwinds/arangodb
report missing cache hit information as 0 values, not as non-representable types
This commit is contained in:
parent
86550966ef
commit
39da191b11
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue