mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 20:50:59 -05:00
More work on PerformanceHelper
Getting first version to run and produce output
This commit is contained in:
@@ -36,9 +36,7 @@ struct PerformanceLayout {
|
||||
static const int NumberValues = 256;
|
||||
static const int MaxValues = 256;
|
||||
|
||||
PerformanceLayout(int32_t nEntries);
|
||||
|
||||
int32_t nEntries;
|
||||
PerformanceLayout();
|
||||
|
||||
struct SceneGraphPerformanceLayout {
|
||||
char name[LengthName];
|
||||
@@ -51,6 +49,7 @@ struct PerformanceLayout {
|
||||
int32_t currentUpdateEphemeris;
|
||||
};
|
||||
SceneGraphPerformanceLayout sceneGraphEntries[MaxValues];
|
||||
int16_t nScaleGraphEntries;
|
||||
|
||||
struct FunctionPerformanceLayout {
|
||||
char name[LengthName];
|
||||
@@ -58,6 +57,7 @@ struct PerformanceLayout {
|
||||
int32_t currentTime;
|
||||
};
|
||||
FunctionPerformanceLayout functionEntries[MaxValues];
|
||||
int16_t nFunctionEntries;
|
||||
};
|
||||
|
||||
} // namespace performance
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#define __PERFORMANCEMANAGER_H__
|
||||
|
||||
#include <chrono>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
namespace ghoul {
|
||||
@@ -45,13 +46,18 @@ public:
|
||||
PerformanceManager();
|
||||
~PerformanceManager();
|
||||
|
||||
void resetPerformanceMeasurements();
|
||||
|
||||
bool isMeasuringPerformance() const;
|
||||
|
||||
void storeIndividualPerformanceMeasurement(std::string identifier, long long us);
|
||||
void storeIndividualPerformanceMeasurement(std::string identifier, long long nanoseconds);
|
||||
void storeScenePerformanceMeasurements(const std::vector<SceneGraphNode*>& sceneNodes);
|
||||
|
||||
private:
|
||||
bool _doPerformanceMeasurements;
|
||||
|
||||
std::map<std::string, size_t> individualPerformanceLocations;
|
||||
|
||||
ghoul::SharedMemory* _performanceMemory;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user