diff --git a/arangod/RocksDBEngine/RocksDBCollection.cpp b/arangod/RocksDBEngine/RocksDBCollection.cpp index 702b98eb1e..137c544ac6 100644 --- a/arangod/RocksDBEngine/RocksDBCollection.cpp +++ b/arangod/RocksDBEngine/RocksDBCollection.cpp @@ -1220,8 +1220,16 @@ void RocksDBCollection::deferDropCollection( /// @brief return engine-specific figures void RocksDBCollection::figuresSpecific( - std::shared_ptr&) { - // no specific figures yet + std::shared_ptr& builder) { + + rocksdb::TransactionDB* db = rocksutils::globalRocksDB(); + RocksDBKeyBounds bounds = RocksDBKeyBounds::CollectionDocuments(_objectId); + rocksdb::Range r(bounds.start(), bounds.end()); + + uint64_t out = 0; + db->GetApproximateSizes(&r, 1, &out, true); + + builder->add("documentsSize", VPackValue(out)); } /// @brief creates the initial indexes for the collection diff --git a/arangod/StorageEngine/PhysicalCollection.cpp b/arangod/StorageEngine/PhysicalCollection.cpp index d63eab9e8e..0a89b60f9e 100644 --- a/arangod/StorageEngine/PhysicalCollection.cpp +++ b/arangod/StorageEngine/PhysicalCollection.cpp @@ -383,9 +383,16 @@ std::shared_ptr PhysicalCollection::figures() { // add index information size_t sizeIndexes = memory(); size_t numIndexes = 0; + bool seenEdgeIndex = false; for (auto const& idx : _indexes) { + // only count an edge index instance + if (idx->type() != Index::TRI_IDX_TYPE_EDGE_INDEX || !seenEdgeIndex) { + ++numIndexes; + } + if (idx->type() == Index::TRI_IDX_TYPE_EDGE_INDEX) { + seenEdgeIndex = true; + } sizeIndexes += static_cast(idx->memory()); - ++numIndexes; } builder->add("indexes", VPackValue(VPackValueType::Object));