$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
AdaptiveSampler Struct Reference

Collector for performance samples within a rolling or fixed window. More...

#include <adaptive_sampler.h>

Collaboration diagram for AdaptiveSampler:
[legend]

Data Fields

Pcg32 rng
 
float window_duration
 
size_t target_samples
 
size_t samples_taken
 
double window_start_time
 
uint64_t window_start_frame
 
uint64_t window_end_frame
 
float avg_dt
 
float alpha
 
AdaptiveSampleItemsamples
 
size_t capacity
 
size_t count
 

Detailed Description

Collector for performance samples within a rolling or fixed window.

Field Documentation

◆ alpha

float AdaptiveSampler::alpha

EMA smoothing factor.

◆ avg_dt

float AdaptiveSampler::avg_dt

Exponential Moving Average of frame deltas.

◆ capacity

size_t AdaptiveSampler::capacity

Current allocation size.

◆ count

size_t AdaptiveSampler::count

Number of samples currently stored.

◆ rng

Pcg32 AdaptiveSampler::rng

◆ samples

AdaptiveSampleItem* AdaptiveSampler::samples

Allocated buffer for sample items.

◆ samples_taken

size_t AdaptiveSampler::samples_taken

◆ target_samples

size_t AdaptiveSampler::target_samples

Expected number of samples to take per window.

◆ window_duration

float AdaptiveSampler::window_duration

Duration of the sampling window in seconds.

◆ window_end_frame

uint64_t AdaptiveSampler::window_end_frame

Frame index of most recent sample.

◆ window_start_frame

uint64_t AdaptiveSampler::window_start_frame

Frame index when window started.

◆ window_start_time

double AdaptiveSampler::window_start_time

Absolute time when the current window started.


The documentation for this struct was generated from the following file: