为基准夹具绑定离线制作回合并维持心跳
This commit is contained in:
parent
dae00ec02f
commit
c77b64e264
@ -4199,6 +4199,7 @@ mod tests {
|
||||
let w = app.jiansun.as_mut().unwrap();
|
||||
w.owner_doc = Some(doc.doc.id.0);
|
||||
w.observed_doc = w.owner_doc;
|
||||
w.pi_binding = json!({"accountId":w.account["id"],"origin":w.origin});
|
||||
let mut progress = w.workflow.production_progress().clone();
|
||||
progress["pictureCells"] = json!((0..16).map(|i| json!({"slotId":format!("pic-{i}"),"label":format!("图位 {i}"),"state":"verified"})).collect::<Vec<_>>());
|
||||
progress["copyCells"] = json!(vec![json!({"state":"filled"}); 33]);
|
||||
@ -4228,7 +4229,9 @@ mod tests {
|
||||
let mut harness = builder.build_eframe(move |cc| {
|
||||
PhotocraftApp::setup_context(&cc.egui_ctx, crate::theme::ThemeKind::ProMedium);
|
||||
crate::cjk_fonts::install_system_provider_for_tests(&cc.egui_ctx);
|
||||
let images = &mut app.jiansun.as_mut().unwrap().agent_images;
|
||||
let workspace = app.jiansun.as_mut().unwrap();
|
||||
workspace.pi_touched = Instant::now();
|
||||
let images = &mut workspace.agent_images;
|
||||
for index in 0..60 {
|
||||
let id = format!("candidate-{index}");
|
||||
let image = egui::ColorImage::filled([96, 120], Color32::from_rgb(index * 3, 92, 52));
|
||||
@ -4275,6 +4278,8 @@ mod tests {
|
||||
let mut total = 0.0;
|
||||
let mut regions = [0.0; 6];
|
||||
for _ in 0..600 {
|
||||
// Keep the offline run connected across all 600 frames.
|
||||
harness.state_mut().jiansun.as_mut().unwrap().pi_touched = Instant::now();
|
||||
let started = Instant::now();
|
||||
harness.step();
|
||||
samples.push(started.elapsed().as_secs_f64() * 1000.0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user