๐Ÿš€ GenServerVirtualTime

Live Examples & Interactive Visualizations
Explore interactive examples showing how GenServerVirtualTime simulates actor systems with virtual time. All these examples run in milliseconds but simulate seconds or minutes of virtual time. Watch out for the test that simulates a century of daily backups!

๐ŸŽจ NEW: Mermaid Flowchart Reports

We've added a powerful new feature: generate beautiful flowchart reports with embedded statistics! These reports show your actor system topology, message flows, and performance metrics all in one view. Check out the Reports & Diagrams section below.

๐Ÿ“Š

Reports & Diagrams

Interactive reports showing actor system topology, message flows, and statistics. Includes Mermaid flowcharts and sequence diagrams.

23+
Examples
3
Formats
Explore Reports โ†’
๐Ÿ’ป

Code Generators

Export simulations to production code in multiple languages and frameworks. Includes C++, Java, Pony, Go, and more with complete build systems.

5
Languages
6
Frameworks
View Generators โ†’

โœจ What Makes This Special

โšก Virtual Time

Simulate hours of behavior in milliseconds. No more waiting for timeouts in tests.

๐ŸŽฏ Deterministic

Perfect reproducibility. Same input = same output, every single time.

๐Ÿ“ˆ Statistics

Built-in message counting, rate calculations, and performance metrics.

๐ŸŽจ Visualizations

Beautiful diagrams with Mermaid flowcharts and sequence diagrams.

๐Ÿ”„ Export Code

Generate production-ready code in C++, Java, Go, and Pony.

๐Ÿงช Easy Testing

Drop-in replacement for GenServer with virtual time support.

๐ŸŽฌ Message Tracing

Track every message exchange for debugging and analysis.

๐Ÿš€ Fast Prototyping

Test ideas in Elixir, then export to production languages.

๐ŸŽ“ Quick Start

Install from Hex and start simulating in minutes:

# Add to mix.exs
def deps do
  [
    {:gen_server_virtual_time, "~> 0.4.0"}
  ]
end

# Create a simulation
simulation = ActorSimulation.new()
|> ActorSimulation.add_actor(:producer,
    send_pattern: {:rate, 100, :data},
    targets: [:consumer])
|> ActorSimulation.add_actor(:consumer)
|> ActorSimulation.run(duration: 5000)

# Generate a flowchart report
html = ActorSimulation.generate_flowchart_report(simulation,
  title: "My System")
File.write!("report.html", html)
See Example Reports โ†’