mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-24 05:18:59 -05:00
Started implementing PerformanceHelper class
This commit is contained in:
@@ -25,9 +25,26 @@
|
||||
#ifndef __PERFORMANCEHELPER_H__
|
||||
#define __PERFORMANCEHELPER_H__
|
||||
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
|
||||
namespace openspace {
|
||||
namespace performance {
|
||||
|
||||
class PerformanceManager;
|
||||
|
||||
class PerformanceHelper {
|
||||
public:
|
||||
PerformanceHelper(std::string identifier, performance::PerformanceManager* manager);
|
||||
~PerformanceHelper();
|
||||
|
||||
private:
|
||||
std::string _identifier;
|
||||
performance::PerformanceManager* _manager;
|
||||
|
||||
std::chrono::high_resolution_clock::time_point _startTime;
|
||||
};
|
||||
|
||||
} // namespace performance
|
||||
} // namespace openspace
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifndef __PERFORMANCEMANAGER_H__
|
||||
#define __PERFORMANCEMANAGER_H__
|
||||
|
||||
#include <chrono>
|
||||
#include <vector>
|
||||
|
||||
namespace ghoul {
|
||||
@@ -45,6 +46,8 @@ public:
|
||||
~PerformanceManager();
|
||||
|
||||
bool isMeasuringPerformance() const;
|
||||
|
||||
void storeIndividualPerformanceMeasurement(std::string identifier, long long us);
|
||||
void storeScenePerformanceMeasurements(const std::vector<SceneGraphNode*>& sceneNodes);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user