@ -133,6 +133,8 @@ DBPropertyType GetPropertyType(const Slice& property, bool* is_int_property,
return kBackgroundErrors ;
return kBackgroundErrors ;
} else if ( in = = " cur-size-active-mem-table " ) {
} else if ( in = = " cur-size-active-mem-table " ) {
return kCurSizeActiveMemTable ;
return kCurSizeActiveMemTable ;
} else if ( in = = " cur-size-all-mem-tables " ) {
return kCurSizeAllMemTables ;
} else if ( in = = " num-entries-active-mem-table " ) {
} else if ( in = = " num-entries-active-mem-table " ) {
return kNumEntriesInMutableMemtable ;
return kNumEntriesInMutableMemtable ;
} else if ( in = = " num-entries-imm-mem-tables " ) {
} else if ( in = = " num-entries-imm-mem-tables " ) {
@ -250,12 +252,17 @@ bool InternalStats::GetIntProperty(DBPropertyType property_type,
// Current size of the active memtable
// Current size of the active memtable
* value = cfd_ - > mem ( ) - > ApproximateMemoryUsage ( ) ;
* value = cfd_ - > mem ( ) - > ApproximateMemoryUsage ( ) ;
return true ;
return true ;
case kCurSizeAllMemTables :
// Current size of the active memtable + immutable memtables
* value = cfd_ - > mem ( ) - > ApproximateMemoryUsage ( ) +
cfd_ - > imm ( ) - > ApproximateMemoryUsage ( ) ;
return true ;
case kNumEntriesInMutableMemtable :
case kNumEntriesInMutableMemtable :
// Current size of the active memtable
// Current number of entires in the active memtable
* value = cfd_ - > mem ( ) - > GetNumEntries ( ) ;
* value = cfd_ - > mem ( ) - > GetNumEntries ( ) ;
return true ;
return true ;
case kNumEntriesInImmutableMemtable :
case kNumEntriesInImmutableMemtable :
// Current size of the active memtable
// Current number of entries in the immutable memtables
* value = cfd_ - > imm ( ) - > current ( ) - > GetTotalNumEntries ( ) ;
* value = cfd_ - > imm ( ) - > current ( ) - > GetTotalNumEntries ( ) ;
return true ;
return true ;
case kEstimatedNumKeys :
case kEstimatedNumKeys :