$darkmode
#include "gpu_profiler.h"Go to the source code of this file.
Functions | |
| bool | app_metrics_log_gpu_stats (GPUProfiler *profiler, double current_time, bool should_log) |
| Logs GPU performance statistics if the reporting window for any stage has elapsed. More... | |
| bool app_metrics_log_gpu_stats | ( | GPUProfiler * | profiler, |
| double | current_time, | ||
| bool | should_log | ||
| ) |
Logs GPU performance statistics if the reporting window for any stage has elapsed.
This function handles the logic of checking sampling windows, calculating missed frames, formatting the output string, and logging the results via the logging system. It also resets samplers after reporting.
| profiler | Pointer to the GPUProfiler containing the stages and samplers. |
| current_time | The current application time (e.g. from glfwGetTime()). |
| should_log | If true, force printing even if interval not elapsed. |