aboutsummaryrefslogtreecommitdiff
path: root/src/common/Metric
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2018-02-17 23:29:34 +0100
committerfunjoker <funjoker109@gmail.com>2021-08-08 21:21:34 +0200
commit89a232de3a7fd049932c840ec45223a77c5e357a (patch)
tree91005cba8150511e9ebbecc434082ca3f01f5daa /src/common/Metric
parentb7aef385e863072eef544dcfcc033090a882ff8f (diff)
Core/Misc: Add PERFORMANCE_PROFILING CMake option
Add a new CMake option called PERFORMANCE_PROFILING that should be used only when profiling the performance. This option is unsupported, do not report any issue happening when enabling this option. (cherry picked from commit db5c9867e2ffde3657f53bc155b474c5d46884dd)
Diffstat (limited to 'src/common/Metric')
-rw-r--r--src/common/Metric/Metric.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/Metric/Metric.h b/src/common/Metric/Metric.h
index 1ce27649fd9..1182db6b501 100644
--- a/src/common/Metric/Metric.h
+++ b/src/common/Metric/Metric.h
@@ -121,7 +121,10 @@ public:
#define sMetric Metric::instance()
-#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS
+#ifdef PERFORMANCE_PROFILING
+#define TC_METRIC_EVENT(category, title, description) ((void)0)
+#define TC_METRIC_VALUE(category, value) ((void)0)
+#elif TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS
#define TC_METRIC_EVENT(category, title, description) \
do { \
if (sMetric->IsEnabled()) \