use Context;
use Value;
use Write;
use Path;
/// Appends events to a growing, deliberately never-closed Chrome-trace JSON
/// array: `[\n {...},\n {...},\n` with no final `]`. This is intentional and
/// spec-legal — the Chrome Trace Event format explicitly tolerates an
/// unterminated array with a trailing comma, exactly so a trace can be
/// streamed to incrementally without a "finalize" step. Perfetto and
/// `chrome://tracing` both parse it leniently. That's what makes
/// `BUILDLINE_SESSION=./build.trace buildline -- <tool>`, run once per tool,
/// produce a file that's openable in Perfetto after every single invocation —
/// no extra command required.