Pulcedocs

Performance Benchmarks

Core load checks live as Go benchmarks so normal unit tests stay fast.

On this page

Server Core Benchmarks

Use these benchmarks to compare changes in runtime pressure, allocations, and lock contention.

benchmarks.sh
go test ./core/server -run ^$ -bench "Benchmark(WorldSetBlockParallel|GiveItemManyPlayersParallel|MoveAndDrainPlayerUpdatesParallel|JoinPlayersSequential)quot; -benchmem -benchtime=3s -count=3

Covered Scenarios

  • BenchmarkWorldSetBlockParallel: parallel server-owned block mutations through Server.SetBlock.
  • BenchmarkGiveItemManyPlayersParallel: parallel inventory service writes across many online players.
  • BenchmarkMoveAndDrainPlayerUpdatesParallel: player movement plus outbox/view aggregation.
  • BenchmarkJoinPlayersSequential: player/entity/view registration cost.

CPU And Lock Contention

For scheduler and lock contention experiments, run selected benchmarks across CPU counts.

cpu-benchmarks.sh
go test ./core/server -run ^$ -bench BenchmarkMoveAndDrainPlayerUpdatesParallel -benchmem -cpu 1,2,4,8,12