qxLib
perf_scope.h
Go to the documentation of this file.
1 /**
2 
3  @file perf_scope.h
4  @brief Contains perf scope macros for profiler (for internal usage only, but user may override them)
5  @details ~
6  @author Khrapov
7  @date 22.12.2022
8  @copyright © Nick Khrapov, 2022. All right reserved.
9 
10 **/
11 #pragma once
12 
13 #include <qx/macros/common.h>
14 
15 #ifndef QX_PERF_SCOPE
16  // ... is category + name
17  // or category
18  // or name
19  // or empty
20  #define QX_PERF_SCOPE(...) QX_EMPTY_MACRO
21 #endif
22 
23 #ifndef QX_PERF_FREE_MUTEX
24  #define QX_PERF_FREE_MUTEX(name) std::mutex name
25 #endif
26 
27 #ifndef QX_PERF_FREE_SHARED_MUTEX
28  #define QX_PERF_FREE_SHARED_MUTEX(name) std::shared_mutex name
29 #endif
30 
31 #ifndef QX_PERF_MUTEX
32  #define QX_PERF_MUTEX(name) mutable std::mutex name
33 #endif
34 
35 #ifndef QX_PERF_SHARED_MUTEX
36  #define QX_PERF_SHARED_MUTEX(name) mutable std::shared_mutex name
37 #endif