Loading core/pipeline/abstractpipeline.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -220,9 +220,13 @@ namespace campvis { } std::chrono::high_resolution_clock::time_point endTime = std::chrono::high_resolution_clock::now(); auto dT = std::chrono::duration_cast<std::chrono::microseconds>(endTime - startTime); auto timeSinceLastExec = std::chrono::duration_cast<std::chrono::microseconds>(endTime - processor->getLastExecutionTime()); double dTms = double(dT.count()) / 1000.; double timeSinceLastExecMs = double(timeSinceLastExec.count()) / 1000.; LINFO("Executed processor " << processor->getName() << " GPU duration: \t" << double(gpuTimeElapsed)/1e6 << ", total: \t" << dTms << " ms"); processor->setLastExeuctionTime(endTime); LINFO("Timing " << processor->getName() << ": GPU: \t" << double(gpuTimeElapsed)/1e6 << "ms, total: \t" << dTms << "ms, since Last Exec: \t" << timeSinceLastExecMs << "ms."); } } } Loading core/pipeline/abstractprocessor.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,16 @@ namespace campvis { _clockExecutionTime = value; } std::chrono::high_resolution_clock::time_point AbstractProcessor::getLastExecutionTime() { return _lastExecutionTime; } void AbstractProcessor::setLastExeuctionTime(const std::chrono::high_resolution_clock::time_point & executionTime) { _lastExecutionTime = executionTime; } void AbstractProcessor::process(DataContainer& data) { if (hasInvalidShader()) { updateShader(); Loading core/pipeline/abstractprocessor.h +12 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include "core/datastructures/datacontainer.h" #include "core/properties/propertycollection.h" #include <chrono> #include <unordered_map> #include <string> #include <vector> Loading Loading @@ -232,6 +233,16 @@ namespace campvis { */ void setClockExecutionTime(bool value); /** * Returns the absolute time of the last (timed) execution */ std::chrono::high_resolution_clock::time_point getLastExecutionTime(); /** * Sets the absolute time of the last execution */ void setLastExeuctionTime(const std::chrono::high_resolution_clock::time_point& executionTime); /** * Returns the current lockProcessor status of this processor. * If a processor is locked, all of its properties are locked and its process method must not be called. Loading Loading @@ -388,6 +399,7 @@ namespace campvis { tbb::atomic<bool> _enabled; ///< flag whether this processor is currently enabled tbb::atomic<bool> _clockExecutionTime; ///< flag whether to measure the execution time of this processor std::chrono::high_resolution_clock::time_point _lastExecutionTime; ///< time of last execution tbb::atomic<int> _ignorePropertyChanges; ///< flag whether signals from properties shall be ignored /// Flag whether this processor is currently locked Loading ext/cgt/texturemanager.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ #include "opengljobprocessor.h" //#define ENABLE_TEXTURE_POOL #define ENABLE_TEXTURE_POOL namespace { /// private class to format iostream to use points as a thousands separator Loading Loading
core/pipeline/abstractpipeline.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -220,9 +220,13 @@ namespace campvis { } std::chrono::high_resolution_clock::time_point endTime = std::chrono::high_resolution_clock::now(); auto dT = std::chrono::duration_cast<std::chrono::microseconds>(endTime - startTime); auto timeSinceLastExec = std::chrono::duration_cast<std::chrono::microseconds>(endTime - processor->getLastExecutionTime()); double dTms = double(dT.count()) / 1000.; double timeSinceLastExecMs = double(timeSinceLastExec.count()) / 1000.; LINFO("Executed processor " << processor->getName() << " GPU duration: \t" << double(gpuTimeElapsed)/1e6 << ", total: \t" << dTms << " ms"); processor->setLastExeuctionTime(endTime); LINFO("Timing " << processor->getName() << ": GPU: \t" << double(gpuTimeElapsed)/1e6 << "ms, total: \t" << dTms << "ms, since Last Exec: \t" << timeSinceLastExecMs << "ms."); } } } Loading
core/pipeline/abstractprocessor.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,16 @@ namespace campvis { _clockExecutionTime = value; } std::chrono::high_resolution_clock::time_point AbstractProcessor::getLastExecutionTime() { return _lastExecutionTime; } void AbstractProcessor::setLastExeuctionTime(const std::chrono::high_resolution_clock::time_point & executionTime) { _lastExecutionTime = executionTime; } void AbstractProcessor::process(DataContainer& data) { if (hasInvalidShader()) { updateShader(); Loading
core/pipeline/abstractprocessor.h +12 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include "core/datastructures/datacontainer.h" #include "core/properties/propertycollection.h" #include <chrono> #include <unordered_map> #include <string> #include <vector> Loading Loading @@ -232,6 +233,16 @@ namespace campvis { */ void setClockExecutionTime(bool value); /** * Returns the absolute time of the last (timed) execution */ std::chrono::high_resolution_clock::time_point getLastExecutionTime(); /** * Sets the absolute time of the last execution */ void setLastExeuctionTime(const std::chrono::high_resolution_clock::time_point& executionTime); /** * Returns the current lockProcessor status of this processor. * If a processor is locked, all of its properties are locked and its process method must not be called. Loading Loading @@ -388,6 +399,7 @@ namespace campvis { tbb::atomic<bool> _enabled; ///< flag whether this processor is currently enabled tbb::atomic<bool> _clockExecutionTime; ///< flag whether to measure the execution time of this processor std::chrono::high_resolution_clock::time_point _lastExecutionTime; ///< time of last execution tbb::atomic<int> _ignorePropertyChanges; ///< flag whether signals from properties shall be ignored /// Flag whether this processor is currently locked Loading
ext/cgt/texturemanager.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ #include "opengljobprocessor.h" //#define ENABLE_TEXTURE_POOL #define ENABLE_TEXTURE_POOL namespace { /// private class to format iostream to use points as a thousands separator Loading