swactor/crates/runtime-dashboard
zacheryasc c55753fd37 feat: mt benchmark (#25)
Add Criterion multi-threaded runtime benchmarks and a live dashboard load example.

- benches/mt_benchmarks.rs: add a Criterion suite with `mt/single_actor`, `mt/multi_actor`, `mt/ring`, and `mt/spawn` benchmarks over 2-4 threads, using `iter_custom` and a `wait_for_n_done` helper for deterministic completion
- crates/runtime-dashboard/examples/bench_dashboard.rs: add an example driving sink/ring/spawner load scenarios through `start_dashboard`/`DashboardConfig` for sustained cross-worker visualization
- Cargo.toml: register the `mt_benchmarks` Criterion bench target with `harness = false`

Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
2026-02-09 14:02:40 +00:00
..
docs feat: runtime dashboard and docs (#23) 2026-02-09 09:04:57 +00:00
examples feat: mt benchmark (#25) 2026-02-09 14:02:40 +00:00
src feat: runtime dashboard and docs (#23) 2026-02-09 09:04:57 +00:00
.gitignore feat: runtime dashboard and docs (#23) 2026-02-09 09:04:57 +00:00
Cargo.toml feat: runtime dashboard and docs (#23) 2026-02-09 09:04:57 +00:00
README.md feat: runtime dashboard and docs (#23) 2026-02-09 09:04:57 +00:00

runtime-dashboard

Visual dashboard and architectural diagrams for the swactor runtime.

Generating Diagrams

Render all .dot sources into SVGs:

./render_docs.sh

Prerequisites (one of):

  • Graphviz — apt install graphviz / brew install graphviz
  • Node.js — the script auto-installs @viz-js/viz into tools/

Generated SVGs are written to docs/generated/ (gitignored).

Diagram Index

DOT sources (docs/*.dot → docs/generated/*.svg)

Diagram Description
architecture.dot Structural map of all structs/traits, grouped by module, with ownership/Arc/borrow/trait-impl edges
dataflow.dot 5 behavioral flows: cross-worker send, same-worker send, actor spawn, external inbox, 6-phase tick cycle
tick_cycle.dot Focused view of the Worker::tick_once pipeline and its 6 phases
type_erasure.dot How generic message/actor types are erased via Box<dyn Any> and Box<dyn AnyActor>

Hand-authored SVGs (docs/*.svg, committed)

Diagram Description
actor_lifecycle.svg Lifecycle states of an actor from spawn to shutdown
message_lifecycle.svg Path of a message from send through inbox to handler
runtime_lifecycle.svg Runtime startup, worker creation, and shutdown sequence