diff --git a/src/lib/diagnostic-context.hpp b/src/lib/diagnostic-context.hpp index 221f59fad..5d3167fee 100644 --- a/src/lib/diagnostic-context.hpp +++ b/src/lib/diagnostic-context.hpp @@ -124,6 +124,10 @@ namespace lib { * on the thread-local diagnostic stack. Might * be empty. Values start with frame next to * the current scope and end with outermost. + * @warning can be inefficient on very large stacks + * @todo benchmark and improve the data structure + * used for the snapshot. Vector is not + * an optimal choice here. */ static ValSequence extractStack() diff --git a/tests/40components.tests b/tests/40components.tests index b1a93d5d1..4f60cf263 100644 --- a/tests/40components.tests +++ b/tests/40components.tests @@ -679,7 +679,7 @@ return: 0 END -TEST "Thread-local diagnostic context" DiagrnsticContext_test < @@ -39,8 +39,9 @@ namespace test{ namespace { // private test setup... + /* WARNING: memory hungry */ const uint NUM_THREADS = 40; - const uint MAX_RAND = 1000*1000; + const uint MAX_RAND = 100*1000; inline bool isOdd (uint val) @@ -80,7 +81,7 @@ namespace test{ * @see lib::ThreadLocal * @see backend::Thread */ - class DiagrnsticContext_test : public Test + class DiagnosticContext_test : public Test { virtual void @@ -147,6 +148,9 @@ namespace test{ * take a snapshot of the full ContextStack and then unwind. * Thus the captured numbers must from a decreasing sequence * of odd values. + * @warning this test case causes memory pressure. + * The reason seems to be the frequent re-allocations + * of the vector used to take the snapshots */ void verify_heavilyParallelUsage() @@ -206,7 +210,7 @@ namespace test{ /** Register this test class... */ - LAUNCHER (DiagrnsticContext_test, "function common"); + LAUNCHER (DiagnosticContext_test, "function common");