use super::*;
#[derive(Clone, Copy, Debug, Default, Deserialize, Getter, PartialEq, Serialize)]
pub struct LatencyDistribution {
#[get(type(copy))]
pub(crate) iterations: usize,
#[get(type(copy))]
pub(crate) p50_us: f64,
#[get(type(copy))]
pub(crate) p95_us: f64,
#[get(type(copy))]
pub(crate) p99_us: f64,
#[get(type(copy))]
#[serde(default)]
pub(crate) p99_9_us: f64,
#[get(type(copy))]
pub(crate) max_us: f64,
#[get(type(copy))]
pub(crate) mean_us: f64,
#[get(type(copy))]
pub(crate) jitter_us: f64,
#[get(type(copy))]
#[serde(default)]
pub(crate) over_2_08ms_count: usize,
#[get(type(copy))]
pub(crate) over_2_78ms_count: usize,
#[get(type(copy))]
pub(crate) over_4_17ms_count: usize,
#[get(type(copy))]
pub(crate) over_6_94ms_count: usize,
#[get(type(copy))]
pub(crate) over_16_67ms_count: usize,
#[get(type(copy))]
pub(crate) missed_240hz_pct: f64,
#[get(type(copy))]
pub(crate) missed_360hz_pct: f64,
#[get(type(copy))]
#[serde(default)]
pub(crate) missed_480hz_pct: f64,
#[get(type(copy))]
pub(crate) effective_fps: f64,
#[get(type(copy))]
pub(crate) mean_dirty_area_ratio: f64,
#[get(type(copy))]
pub(crate) full_redraw_count: usize,
#[get(type(copy))]
#[serde(default)]
pub(crate) alloc_count_total: u64,
#[get(type(copy))]
#[serde(default)]
pub(crate) free_count_total: u64,
#[get(type(copy))]
#[serde(default)]
pub(crate) bytes_allocated_total: u64,
#[get(type(copy))]
#[serde(default)]
pub(crate) mean_allocs_per_frame: f64,
#[get(type(copy))]
#[serde(default)]
pub(crate) mean_bytes_per_frame: f64,
#[get(type(copy))]
#[serde(default)]
pub(crate) max_allocs_per_frame: u64,
#[get(type(copy))]
#[serde(default)]
pub(crate) max_bytes_per_frame: u64,
#[get(type(copy))]
#[serde(default)]
pub(crate) peak_live_bytes: u64,
#[get(type(copy))]
#[serde(default)]
pub(crate) layout_invalidations: u64,
#[get(type(copy))]
#[serde(default)]
pub(crate) layout_passes: u64,
#[get(type(copy))]
#[serde(default)]
pub(crate) layout_changed_passes: u64,
#[get(type(copy))]
#[serde(default)]
pub(crate) layout_changed_nodes_total: u64,
#[get(type(copy))]
#[serde(default)]
pub(crate) draw_commands_total: u64,
#[get(type(copy))]
#[serde(default)]
pub(crate) pixels_shaded_total: u64,
}
#[derive(Clone, Debug, Default)]
pub(crate) struct FrameMeasureAccum {
pub(crate) samples_us: Vec<f64>,
pub(crate) dirty_ratios: Vec<f32>,
pub(crate) full_redraw_count: usize,
pub(crate) alloc_count_total: u64,
pub(crate) free_count_total: u64,
pub(crate) bytes_allocated_total: u64,
pub(crate) max_allocs_per_frame: u64,
pub(crate) max_bytes_per_frame: u64,
pub(crate) peak_live_bytes: u64,
pub(crate) layout_invalidations: u64,
pub(crate) layout_passes: u64,
pub(crate) layout_changed_passes: u64,
pub(crate) layout_changed_nodes_total: u64,
pub(crate) draw_commands_total: u64,
pub(crate) pixels_shaded_total: u64,
}
#[derive(Clone, Copy, Debug)]
pub(crate) struct RowMutationStep {
pub(crate) elapsed_us: f64,
pub(crate) frame_hash: u64,
pub(crate) telemetry: FrameTelemetry,
pub(crate) alloc_delta: AllocationSnapshot,
}
#[derive(Clone, Debug, Deserialize, Getter, New, PartialEq, Serialize)]
pub struct StressMatrixEntry {
pub(crate) name: String,
#[get(type(copy))]
pub(crate) latency: LatencyDistribution,
pub(crate) detail: String,
}
#[derive(Clone, Debug, Deserialize, Getter, PartialEq, Serialize)]
pub struct PartialDamageAbSummary {
pub(crate) name: String,
#[get(type(copy))]
pub(crate) baseline_full_redraw: LatencyDistribution,
#[get(type(copy))]
pub(crate) candidate_partial_damage: LatencyDistribution,
#[get(type(copy))]
pub(crate) p50_speedup_pct: f64,
#[get(type(copy))]
pub(crate) p95_speedup_pct: f64,
#[get(type(copy))]
pub(crate) p99_speedup_pct: f64,
#[get(type(copy))]
pub(crate) dirty_area_ratio_drop_pct: f64,
#[get(type(copy))]
pub(crate) bit_exact_parity: bool,
#[get(type(copy))]
pub(crate) verified_steps: usize,
pub(crate) detail: String,
}
#[derive(Clone, Debug, Deserialize, Getter, New, PartialEq, Serialize)]
pub struct StressMatrixReport {
pub(crate) entries: Vec<StressMatrixEntry>,
#[get(skip)]
pub(crate) partial_damage_ab: Option<PartialDamageAbSummary>,
#[get(skip)]
#[new(skip)]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub(crate) cold_start_ttff: Option<ColdStartTtffReport>,
}
#[derive(Clone, Data, Debug)]
pub(crate) struct BenchGame2dScene {
pub(crate) world: GameWorld,
pub(crate) physics: PhysicsWorld2D,
pub(crate) particles: ParticleSystem,
pub(crate) tilemap: TileMap,
#[get(type(copy))]
pub(crate) camera: Camera2D,
pub(crate) snapshots: DoubleBufferedSnapshot<World2DSnapshot>,
#[get(type(copy))]
pub(crate) player_id: EntityId,
#[get(type(copy))]
pub(crate) fixed_steps: u64,
#[get(type(copy))]
pub(crate) rendered_frames: u64,
pub(crate) hud_text_buf: String,
}
#[derive(Clone, Data, Debug)]
pub(crate) struct BenchGame3dGpuScene {
pub(crate) world: World3D,
pub(crate) actions: ActionMap,
pub(crate) snapshots: DoubleBufferedSnapshot<World3DSnapshot>,
pub(crate) gpu_target: GpuCompositeTarget,
#[get(type(copy))]
pub(crate) frame_fence: u64,
#[get(type(copy))]
pub(crate) fixed_steps: u64,
#[get(type(copy))]
pub(crate) rendered_frames: u64,
pub(crate) hud_text_buf: String,
}