Add rendering info reports to ActionJournal (#3545)

This commit is contained in:
Adrian Cojocaru
2025-07-29 19:46:46 +03:00
committed by GitHub
parent 2077df9a2c
commit 8011fa51be
15 changed files with 244 additions and 10 deletions

View File

@@ -15,12 +15,11 @@ class SymbolLayer;
namespace gfx {
struct RenderingStats {
RenderingStats() = default;
bool isZero() const;
/// Frame CPU encoding time (milliseconds)
/// Frame CPU encoding time (seconds)
double encodingTime = 0.0;
/// Frame CPU rendering time (milliseconds)
/// Frame CPU rendering time (seconds)
double renderingTime = 0.0;
/// Number of frames rendered

View File

@@ -87,6 +87,23 @@ public:
*/
uint32_t logFileCount() const { return logFileCount_; }
/**
* @brief Set the number of seconds to wait between rendering stats reports.
*
* @param interval time interval in seconds.
* @return ActionJournalOptions for chaining options together.
*/
ActionJournalOptions& withRenderingStatsReportInterval(const uint32_t interval) {
renderingStatsReportInterval_ = interval;
return *this;
}
/**
* @brief Gets the previously set (or default) time interval.
* @return Returns report time interval in seconds
*/
uint32_t renderingStatsReportInterval() const { return renderingStatsReportInterval_; }
protected:
bool enable_ = false;
// path of the log
@@ -95,6 +112,8 @@ protected:
uint32_t logFileSize_ = 1024 * 1024;
// number of log files (each of `logFileSize` size)
uint32_t logFileCount_ = 5;
// the wait time (seconds) between rendering reports
uint32_t renderingStatsReportInterval_ = 60;
};
} // namespace util