Faster tests: hostile_params_never_panic shares its commands across threads (154 s to 20 s), the design-file fuzz test tries its seeded cases on all cores (21 s to 7.5 s), the kernel's tangent-primitive boolean test runs its three seeds at once, and the headless scenario harness skips the software viewport render it threw away every frame (scenarios 63 s to 26 s). kill_mid_save waits for the saver to reach a varying round instead of sleeping a fixed time, so it holds on a busy machine
This commit is contained in:
1 parent
4a41de72ec
commit
aa268f0f0e
6 files changed
+90
-41
No files matched your search
@@ -170,6 +170,8 @@ impl Harness {
|
||||
/// File pickers answer like a person would: save into the scenario's folder, open the file
|
||||
/// the scenario chose.
|
||||
fn install(&mut self) {
|
||||
// Frames are laid out, never painted.
|
||||
self.app.viewport.no_pixels = true;
|
||||
let dir = self.dir.clone();
|
||||
self.app.services.pick_save = Some(Box::new(move |name, _| Some(dir.join(name).to_string_lossy().into_owned())));
|
||||
let next = self.next_file.clone();
|
||||
|
||||
@@ -35,6 +35,8 @@ pub struct ViewportState {
|
||||
hl_slot: SceneSlot,
|
||||
hl_key: u64,
|
||||
cpu: Option<(u64, egui::TextureHandle)>,
|
||||
/// Nothing will look at the frame (the headless scenario harness): skip the software render.
|
||||
pub no_pixels: bool,
|
||||
pub nav: Option<NavMode>,
|
||||
/// What a click would pick now (after the active command's filter).
|
||||
pub hover: Option<Hit>,
|
||||
@@ -1927,6 +1929,9 @@ fn overlays(app: &SolveApp, painter: &egui::Painter, proj: &Proj) {
|
||||
}
|
||||
|
||||
fn cpu_render(app: &mut SolveApp, ctx: &egui::Context, painter: &egui::Painter, rect: Rect, proj: &Proj) {
|
||||
if app.viewport.no_pixels {
|
||||
return;
|
||||
}
|
||||
let mut h = std::collections::hash_map::DefaultHasher::new();
|
||||
scene_key(app).hash(&mut h);
|
||||
for v in [proj.cam.yaw, proj.cam.pitch, proj.cam.distance, proj.cam.target.x, proj.cam.target.y, proj.cam.target.z] {
|
||||
|
||||
Reference in new issue
Block a user