summaryrefslogtreecommitdiff
path: root/src/utils/perfomance.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-31 19:49:21 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-31 19:49:21 +0300
commitcca552c123e6522541b15e7cf4f51f3ec0fcf564 (patch)
tree2efc351ab14d91722de0b7cd2d5932a42235989c /src/utils/perfomance.h
parent5d5f60a40dcd343ed34d4257b2383e9ed9091c3f (diff)
downloadplus-cca552c123e6522541b15e7cf4f51f3ec0fcf564.tar.gz
plus-cca552c123e6522541b15e7cf4f51f3ec0fcf564.tar.bz2
plus-cca552c123e6522541b15e7cf4f51f3ec0fcf564.tar.xz
plus-cca552c123e6522541b15e7cf4f51f3ec0fcf564.zip
Improve profiler speed.
Diffstat (limited to 'src/utils/perfomance.h')
-rw-r--r--src/utils/perfomance.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/perfomance.h b/src/utils/perfomance.h
index c88859730..4a5f4fc17 100644
--- a/src/utils/perfomance.h
+++ b/src/utils/perfomance.h
@@ -31,6 +31,7 @@
#include "localconsts.h"
#define PROFILER_START() Perfomance::start();
+#define PROFILER_END() Perfomance::flush();
#define BLOCK_START(name) Perfomance::blockStart(name);
#define BLOCK_END(name) Perfomance::blockEnd(name);
#define FUNC_BLOCK(name, id) Perfomance::Func PerfomanceFunc##id(name);
@@ -47,6 +48,8 @@ namespace Perfomance
void blockEnd(const std::string &name);
+ void flush();
+
class Func final
{
public:
@@ -68,6 +71,7 @@ namespace Perfomance
#else // USE_PROFILER
#define PROFILER_START()
+#define PROFILER_END()
#define BLOCK_START(name)
#define BLOCK_END(name)
#define FUNC_BLOCK(name, id)