$darkmode
#include "app_metrics.h"#include "adaptive_sampler.h"#include "gpu_profiler.h"#include "log.h"#include "utils.h"#include <stdio.h>#include <string.h>Functions | |
| static void | format_missed_frames (const AdaptiveSampler *sampler, char *buffer, size_t size) |
| static void | format_relative_percentages (const GPUProfiler *profiler, int stage_index, float current_avg_ms, char *buffer, size_t size) |
| static void | build_ascii_bar (char *bar, size_t bar_size, int start_char, int width_char, char symbol, bool is_root) |
| static void | log_ascii_timeline (const GPUProfiler *profiler) |
| static void | log_gpu_stage (const char *stage_name, float avg_ms, const char *details, const char *percentages, int depth) |
| 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. |
|
static |
|
static |
|
static |
|
static |
|
static |