viewport_lib/renderer/
stats.rs1#[derive(Debug, Clone, Copy, Default)]
5pub struct FrameStats {
6 pub total_objects: u32,
8 pub visible_objects: u32,
10 pub culled_objects: u32,
12 pub draw_calls: u32,
14 pub instanced_batches: u32,
16 pub triangles_submitted: u64,
18 pub shadow_draw_calls: u32,
20}
21
22#[cfg(test)]
23mod tests {
24 use super::*;
25
26 #[test]
27 fn test_frame_stats_default_is_zero() {
28 let stats = FrameStats::default();
29 assert_eq!(stats.total_objects, 0);
30 assert_eq!(stats.visible_objects, 0);
31 assert_eq!(stats.culled_objects, 0);
32 assert_eq!(stats.draw_calls, 0);
33 assert_eq!(stats.instanced_batches, 0);
34 assert_eq!(stats.triangles_submitted, 0);
35 assert_eq!(stats.shadow_draw_calls, 0);
36 }
37}