Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::batch_stats Struct Reference

Statistics for batch collection and rendering performance. More...

#include <batch_collector.h>

Public Member Functions

void reset ()
 Reset all statistics to zero.
 
void calculate_derived_stats ()
 Calculate derived statistics (efficiency, averages)
 
auto to_string () const -> std::string
 Get string representation for debugging.
 

Public Attributes

uint32_t total_batches = 0
 Total number of batches created.
 
uint32_t total_instances = 0
 Total number of instances across all batches.
 
uint32_t draw_calls_saved = 0
 Number of draw calls saved by batching (instances - batches)
 
float collection_time_ms = 0.0f
 Time spent collecting instances (milliseconds)
 
float preparation_time_ms = 0.0f
 Time spent preparing batches (milliseconds)
 
float submission_time_ms = 0.0f
 Time spent submitting batches (milliseconds)
 
size_t instance_buffer_memory_used = 0
 Memory used for instance buffers (bytes)
 
float average_batch_size = 0.0f
 Average number of instances per batch.
 
float batching_efficiency = 0.0f
 Batching efficiency (instances / batches)
 
uint32_t split_batches = 0
 Number of batches that were split due to size limits.
 

Detailed Description

Statistics for batch collection and rendering performance.

Definition at line 15 of file batch_collector.h.

Member Function Documentation

◆ calculate_derived_stats()

void unravel::batch_stats::calculate_derived_stats ( )

Calculate derived statistics (efficiency, averages)

Definition at line 27 of file batch_collector.cpp.

◆ reset()

void unravel::batch_stats::reset ( )

Reset all statistics to zero.

Definition at line 13 of file batch_collector.cpp.

◆ to_string()

auto unravel::batch_stats::to_string ( ) const -> std::string

Get string representation for debugging.

Returns
Formatted statistics string

Definition at line 43 of file batch_collector.cpp.

Member Data Documentation

◆ average_batch_size

float unravel::batch_stats::average_batch_size = 0.0f

Average number of instances per batch.

Definition at line 39 of file batch_collector.h.

◆ batching_efficiency

float unravel::batch_stats::batching_efficiency = 0.0f

Batching efficiency (instances / batches)

Definition at line 42 of file batch_collector.h.

◆ collection_time_ms

float unravel::batch_stats::collection_time_ms = 0.0f

Time spent collecting instances (milliseconds)

Definition at line 27 of file batch_collector.h.

◆ draw_calls_saved

uint32_t unravel::batch_stats::draw_calls_saved = 0

Number of draw calls saved by batching (instances - batches)

Definition at line 24 of file batch_collector.h.

◆ instance_buffer_memory_used

size_t unravel::batch_stats::instance_buffer_memory_used = 0

Memory used for instance buffers (bytes)

Definition at line 36 of file batch_collector.h.

◆ preparation_time_ms

float unravel::batch_stats::preparation_time_ms = 0.0f

Time spent preparing batches (milliseconds)

Definition at line 30 of file batch_collector.h.

◆ split_batches

uint32_t unravel::batch_stats::split_batches = 0

Number of batches that were split due to size limits.

Definition at line 45 of file batch_collector.h.

◆ submission_time_ms

float unravel::batch_stats::submission_time_ms = 0.0f

Time spent submitting batches (milliseconds)

Definition at line 33 of file batch_collector.h.

◆ total_batches

uint32_t unravel::batch_stats::total_batches = 0

Total number of batches created.

Definition at line 18 of file batch_collector.h.

◆ total_instances

uint32_t unravel::batch_stats::total_instances = 0

Total number of instances across all batches.

Definition at line 21 of file batch_collector.h.


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