Murloc Cult

Back to the archive

mod-free-will now measures what virtual players cost

The module counts the CPU time spent on virtual players and the memory added since world startup; the "AI status" panel shows these values.

Build
Build success (1 min) · Target worldserver
  • Per-thread CPU time (CLOCK_THREAD_CPUTIME_ID) summed over: the module update (brains, client-less sessions), intake of packets addressed to them, and each virtual player's Player::Update, bracketed by the core's OnPlayerBeforeUpdate / OnPlayerAfterUpdate hooks.
  • Nested measurements (a packet sent during an update) are counted once.
  • Memory: worldserver resident memory minus the value recorded at world startup, before virtual players log in.
  • New resources block in the module status (existing fields unchanged); ai-status.py averages it over the last minute.
  • First reading, 98 players: 15.7 % of one core (1.6 % of the machine), 1.3 GB of memory (4 %).