Documentation
    Preparing search index...
    • Master program.

      Creates a master program that executing the servant programs in parallel.

      Note that, IMasterProps.servant property must be the path of the servant program executing the servant function.

      The servants are child processes. When a servant fails to connect or to execute, every servant receives a close attempt before the returned promise rejects.

      Processing cost: Totals are split across T servants once; E events are aggregated with hash-based endpoint grouping. Progress notifications update the aggregate from one servant counter delta in constant time. Event statistics and rendering traverse their input populations; discovery visits each real directory once.

      Computation reuse: A master distributes distinct request budgets rather than replaying one effectful request. Endpoint grouping shares one event population across whole-run and endpoint statistics. Results are not cached across benchmark runs because server state and timing change.

      Resource ownership: Each master owns at most threads connectors and simultaneous function workers; connector closure is attempted on connection/execution success or failure; a rejected close is suppressed and may leave an unreleased child process. Events retained by servants/master scale with logged events, and memory samples with run duration. The independent sampler detaches its report target on stop or rejection and clears/wakes its owned timer. A pending caller memory getter has no cancellation hook, but its task retains only the sampler state/getter and cannot keep the master report arrays, connectors or event collections through that state. Its eventual result is discarded after deactivation. Returned reports transfer their arrays to callers.

      Platform boundary: WorkerConnector process mode owns Node child-process launch/IPC and its explicit stdio modes. Feature discovery resolves the caller location with native path and fs realpath/stat, follows directory links with realpath cycle detection and imports discovered native absolute paths. It does not infer filesystem case policy from OS names.

      Parameters

      Returns Promise<DynamicBenchmarker.IReport>

      Benchmark report

      contracts/common.md#principled-implementation Inputs are validated as safe integers before any process starts; totals are distributed by floor plus remainder; servants execute concurrently and every event is grouped by method and path template in a hash map; closing is attempted for every spawned servant on success and on failure, and the memory sampler is deactivated when the run ends, detaching its report array and clearing/waking its owned timer immediately; a pending caller getter may settle later but cannot append.

      contracts/common.md#clear-and-simple-design One function owns the run and keeps the sequence readable: validate, spawn, sample, execute, close, aggregate; statistics come from DynamicBenchmarkStatistics and the closing helper is shared by the failure and success paths.

      contracts/common.md#prohibited-implementation-shortcuts A servant that fails to close cannot alter a finished report and is not allowed to hide the run's own error, so closing failures are dropped on purpose; no other error is swallowed except a rejecting memory getter, which ends sampling as documented.

      contracts/common.md#meaningful-documentation The comment states what the master does, that the servant property must name the servant program, that servants are child processes, and that every servant receives a close attempt before a failure rejects.