# `Cauldron2D.Stats`
[🔗](https://github.com/jaman/cauldron/blob/v0.2.2/cauldron_2d/lib/cauldron_2d/stats.ex#L1)

How this node is keeping up: every running world as `Cauldron2D.World.stats/1`
gives it, and the node it runs on.

    Cauldron2D.Stats.worlds()
    Cauldron2D.Stats.node()

# `node_stats`

```elixir
@type node_stats() :: %{
  processes: non_neg_integer(),
  memory_mb: non_neg_integer(),
  run_queue: non_neg_integer(),
  schedulers: pos_integer(),
  busy: float()
}
```

# `world`

```elixir
@type world() :: %{
  name: String.t(),
  players: non_neg_integer(),
  hz: number(),
  steps: non_neg_integer(),
  ticks: non_neg_integer(),
  tick_us: %{
    mean: non_neg_integer(),
    p95: non_neg_integer(),
    max: non_neg_integer()
  },
  behind: non_neg_integer()
}
```

# `node`

```elixir
@spec node() :: node_stats()
```

The processes, the memory in megabytes, the run queue, the schedulers of this node,
and `busy`, the share of the schedulers' time spent running since the last call,
0.0 to 1.0 (0.0 on the first call).

# `worlds`

```elixir
@spec worlds() :: [world()]
```

Every running world's stats, with the world's id as its `:name`, sorted.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
