From 1b51c0506869a202d216f6821d5107548182e655 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 11 Oct 2016 16:44:51 -0400 Subject: [PATCH] include/mempool: note about runtime complexity Signed-off-by: Sage Weil --- src/include/mempool.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/include/mempool.h b/src/include/mempool.h index 029915417054a..74fdc15193036 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. -- 2.39.5