diff --git a/include/openspace/performance/performancehelper.h b/include/openspace/performance/performancehelper.h index 758be2d19a..79ff6e97c5 100644 --- a/include/openspace/performance/performancehelper.h +++ b/include/openspace/performance/performancehelper.h @@ -44,7 +44,13 @@ private: std::chrono::high_resolution_clock::time_point _startTime; }; + +#define __MERGE(a,b) a##b +#define __LABEL(a) __MERGE(unique_name_, a) +/// Declare a new variable for measuring the performance of the current block +#define PerformanceMeasurement(name) auto __LABEL(__LINE__) = openspace::performance::PerformanceHelper((name), OsEng.renderEngine().performanceManager()) + } // namespace performance } // namespace openspace