From: Sage Weil Date: Tue, 11 Oct 2016 20:44:51 +0000 (-0400) Subject: include/mempool: note about runtime complexity X-Git-Tag: v11.1.0~442^2~14 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1b51c0506869a202d216f6821d5107548182e655;p=ceph-ci.git include/mempool: note about runtime complexity Signed-off-by: Sage Weil --- diff --git a/src/include/mempool.h b/src/include/mempool.h index 02991541705..74fdc151930 100644 --- a/src/include/mempool.h +++ b/src/include/mempool.h @@ -148,13 +148,17 @@ The simplest way to interrogate the process is with Formater *f = ... mempool::dump(f); -This will dump information about *all* memory pools. +This will dump information about *all* memory pools. When debug mode +is enabled, the runtime complexity of dump is O(num_shards * +num_types). When debug name is disabled it is O(num_shards). You can also interogate a specific pool programatically with size_t bytes = unittest_2::allocated_bytes(); size_t items = unittest_2::allocated_items(); +The runtime complexity is O(num_shards). + Note that you cannot easily query per-type, primarily because debug mode is optional and you should not rely on that information being available.