diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/statistics.cc | 7 | ||||
-rw-r--r-- | src/base/statistics.hh | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/base/statistics.cc b/src/base/statistics.cc index 545d08cab..8034625be 100644 --- a/src/base/statistics.cc +++ b/src/base/statistics.cc @@ -433,6 +433,7 @@ Formula::str() const return root ? root->str() : ""; } +CallbackQueue dumpQueue; CallbackQueue resetQueue; void @@ -458,6 +459,12 @@ enable() _enabled = true; } +void +registerDumpCallback(Callback *cb) +{ + dumpQueue.add(cb); +} + } // namespace Stats void diff --git a/src/base/statistics.hh b/src/base/statistics.hh index 67c09bb6a..c36f8f461 100644 --- a/src/base/statistics.hh +++ b/src/base/statistics.hh @@ -3135,6 +3135,12 @@ bool enabled(); */ void registerResetCallback(Callback *cb); +/** + * Register a callback that should be called whenever statistics are + * about to be dumped + */ +void registerDumpCallback(Callback *cb); + std::list<Info *> &statsList(); } // namespace Stats |