ServerInspector.start constructor
ServerInspector.start({})
Starts publishing immediately, but asynchronously: events reported while the socket is still binding only land in the ring, which is where an attacher would find them anyway.
pid defaults to this process — overridable so a single-process test
can stage a "restart", which is otherwise invisible: the handle key is
name-pid, and two inspectors in one test share a pid.
Implementation
factory ServerInspector.start({
required String runDir,
required String projectRoot,
required String name,
int ringSize = 500,
int detailsByteCap = 16 * 1024 * 1024,
int? pid,
}) {
var inspector = ServerInspector._(
runDir: runDir,
projectRoot: projectRoot,
name: name,
ringSize: ringSize,
detailsByteCap: detailsByteCap,
pid: pid ?? io.pid,
);
unawaited(inspector._publish());
return inspector;
}