| 3496 | } |
| 3497 | |
| 3498 | fn terminate_child_gracefully(child: &mut Child) { |
| 3499 | #[cfg(unix)] |
| 3500 | { |
| 3501 | let _ = Command::new("kill") |
| 3502 | .arg("-TERM") |
| 3503 | .arg(child.id().to_string()) |
| 3504 | .stdout(Stdio::null()) |
| 3505 | .stderr(Stdio::null()) |
| 3506 | .status(); |
| 3507 | let started = Instant::now(); |
| 3508 | while started.elapsed() < Duration::from_secs(5) { |
| 3509 | if child.try_wait().ok().flatten().is_some() { |
| 3510 | return; |
| 3511 | } |
| 3512 | std::thread::sleep(Duration::from_millis(25)); |
| 3513 | } |
| 3514 | } |
| 3515 | #[cfg(not(unix))] |
| 3516 | { |
| 3517 | let _ = child; |
| 3518 | } |
| 3519 | } |
| 3520 | |
| 3521 | fn perf_diagnose_indexed_update() -> Result<()> { |
| 3522 | Pglite::preload()?; |