magi-code 0.96.1

Repository-aware CLI coding agent for terminal work
Documentation
use super::*;
use tempfile::TempDir;

#[test]
#[ignore = "release-mode session snapshot measurement; run with --release --ignored --nocapture"]
fn session_snapshot_size_measurement() {
    let temp = TempDir::new().unwrap();
    for size in [64 * 1024usize, 32 * 1024 * 1024, 128 * 1024 * 1024] {
        let path = temp.path().join(format!("snapshot-{size}.jsonl"));
        fs::write(&path, vec![b'x'; size]).unwrap();
        crate::sessions::store::secure_profiling_session_root(temp.path());
        let started = std::time::Instant::now();
        let snapshot = capture_session_snapshot(&path).unwrap().unwrap();
        eprintln!(
            "session_snapshot file_bytes={} bytes_read={} elapsed_us={}",
            size,
            snapshot.bytes_read,
            started.elapsed().as_micros()
        );
    }
}