1
0
Fork 0

return memory usage for all indexes

This commit is contained in:
Jan Steemann 2015-08-26 17:13:41 +02:00
parent 2212be29c0
commit 473ed2c418
6 changed files with 6 additions and 0 deletions

View File

@ -91,6 +91,7 @@ triagens::basics::Json CapConstraint::toJson (TRI_memory_zone_t* zone,
triagens::basics::Json CapConstraint::toJsonFigures (TRI_memory_zone_t* zone) const {
triagens::basics::Json json(triagens::basics::Json::Object);
json("memory", triagens::basics::Json(static_cast<double>(memory())));
return json;
}

View File

@ -396,6 +396,7 @@ triagens::basics::Json EdgeIndex::toJson (TRI_memory_zone_t* zone,
triagens::basics::Json EdgeIndex::toJsonFigures (TRI_memory_zone_t* zone) const {
triagens::basics::Json json(triagens::basics::Json::Object);
json("memory", triagens::basics::Json(static_cast<double>(memory())));
json("buckets", triagens::basics::Json(static_cast<double>(_numBuckets)));
return json;

View File

@ -181,6 +181,7 @@ triagens::basics::Json FulltextIndex::toJson (TRI_memory_zone_t* zone,
triagens::basics::Json FulltextIndex::toJsonFigures (TRI_memory_zone_t* zone) const {
triagens::basics::Json json(triagens::basics::Json::Object);
json("memory", triagens::basics::Json(static_cast<double>(memory())));
return json;
}

View File

@ -176,6 +176,7 @@ triagens::basics::Json GeoIndex2::toJson (TRI_memory_zone_t* zone,
triagens::basics::Json GeoIndex2::toJsonFigures (TRI_memory_zone_t* zone) const {
triagens::basics::Json json(triagens::basics::Json::Object);
json("memory", triagens::basics::Json(static_cast<double>(memory())));
return json;
}

View File

@ -265,6 +265,7 @@ triagens::basics::Json HashIndex::toJson (TRI_memory_zone_t* zone,
triagens::basics::Json HashIndex::toJsonFigures (TRI_memory_zone_t* zone) const {
triagens::basics::Json json(zone, triagens::basics::Json::Object);
json("memory", triagens::basics::Json(static_cast<double>(memory())));
if (_unique) {
_uniqueArray._hashArray->appendToJson(zone, json);
}

View File

@ -122,6 +122,7 @@ triagens::basics::Json PrimaryIndex::toJson (TRI_memory_zone_t* zone,
triagens::basics::Json PrimaryIndex::toJsonFigures (TRI_memory_zone_t* zone) const {
triagens::basics::Json json(zone, triagens::basics::Json::Object);
json("memory", triagens::basics::Json(static_cast<double>(memory())));
json("nrAlloc", triagens::basics::Json(static_cast<double>(_primaryIndex._nrAlloc)));
json("nrUsed", triagens::basics::Json(static_cast<double>(_primaryIndex._nrUsed)));