$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
app_metrics.h File Reference
#include "gpu_profiler.h"
Include dependency graph for app_metrics.h:
This graph shows which files directly or indirectly include this file:

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...
 

Function Documentation

◆ app_metrics_log_gpu_stats()

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.

Parameters
profilerPointer to the GPUProfiler containing the stages and samplers.
current_timeThe current application time (e.g. from glfwGetTime()).
should_logIf true, force printing even if interval not elapsed.
Returns
true if logs were printed (2s interval elapsed), false otherwise.
Here is the call graph for this function: