Cauldron2D.Stats (Cauldron2D v0.1.4)

Copy Markdown View Source

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

Cauldron2D.Stats.arenas()
Cauldron2D.Stats.node()

Summary

Functions

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

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).

Types

arena()

@type arena() :: %{
  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_stats()

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

Functions

arenas()

@spec arenas() :: [arena()]

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

node()

@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).