Benchmarking Tools

Protocol Benchmark

Test simulator performance and protocol overhead:

# Default benchmark
composabl benchmark protocol

# Specific simulator and environment
composabl benchmark protocol \
  --sim-name sim-mujoco \
  --env-name walker2d \
  --running-time-s 30

# With custom address
composabl benchmark protocol \
  --sim-address localhost:1337 \
  --running-time-s 60

# Output: 15432 (iterations per second)

Benchmark Multiple Environments

# Example test script using CLI
envs = [
    ("sim-demo", ""),
    ("sim-mujoco", "ant"),
    ("sim-mujoco", "humanoid"),
    ("sim-lunar-lander", ""),
    ("sim-cartpole", "")
]

for sim_name, env_name in envs:
    result = subprocess.run([
        "composabl", "benchmark", "protocol",
        "--sim-name", sim_name,
        "--env-name", env_name,
        "--running-time-s", "10"
    ], capture_output=True, text=True)
    
    print(f"{sim_name}/{env_name}: {result.stdout.strip()} iter/s")

Last updated