Module executor

Module executor 

Source
Expand description

2026-09-26: drive, the loop that turns a benchmark into a stream of frames, and BenchmarkExecutor, which runs a benchmark’s lifecycle as a task on a given tokio runtime.

The run’s frames and plugin events cross to the caller over std::sync::mpsc channels, which RunHandle::drain reads without blocking, so a render loop never awaits the run.

Owner: bench. Invariants:

  • drive yields nothing after the first terminal frame or the first error.
  • Every return path of a run’s task calls the benchmark’s cleanup() once and then sets RunHandle::is_finished.

Structs§

BenchmarkExecutor
2026-09-26: Starts benchmark runs on an existing tokio runtime.
RunHandle
2026-09-26: The caller’s control surface for one in-flight run.

Enums§

ExecutorMessage
2026-09-26: One message drained from a run. Frame is boxed so that an Event does not carry the size of a BenchmarkResult.

Functions§

drive
2026-09-26: Drive bench by calling next() until it reports a terminal status or errors. Benchmark::run’s default body and the executor both use it.
is_final
2026-09-26: True when a frame ends the run, by the same rule drive stops on.
terminal_status
2026-09-26: Completed when ok, else Failed.