File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,11 @@ impl MallocSizeOf for DBAndColumns {
236236 fn size_of ( & self , ops : & mut parity_util_mem:: MallocSizeOfOps ) -> usize {
237237 let mut total = self . column_names . size_of ( ops)
238238 // we have at least one column always, so we can call property on it
239- + self . maybe_property ( 0 , "rocksdb.block-cache-usage" ) . unwrap_or ( 0 ) ;
239+ + self . db
240+ . property_int_value_cf ( self . cf ( 0 ) , "rocksdb.block-cache-usage" )
241+ . unwrap_or ( Some ( 0 ) )
242+ . map ( |x| x as usize )
243+ . unwrap_or ( 0 ) ;
240244
241245 for v in 0 ..self . column_names . len ( ) {
242246 total += self . static_property_or_warn ( v, "rocksdb.estimate-table-readers-mem" ) ;
@@ -261,10 +265,6 @@ impl DBAndColumns {
261265 }
262266 }
263267 }
264-
265- fn maybe_property ( & self , col : usize , prop : & str ) -> Option < usize > {
266- self . db . property_int_value_cf ( self . cf ( col) , prop) . unwrap_or ( Some ( 0 ) ) . map ( |x| x as usize )
267- }
268268}
269269
270270/// Key-Value database.
You can’t perform that action at this time.
0 commit comments