Soak Runs

1file
1figure
3min read
Sheet 24 of 47 · Explore

Filesreport.json

Filereport.jsonLoad runs hammer one thing. A soak run lets bots live on the server for hours, the way players do, and watches what the server does over that time: TPS that decays, MSPT that creeps up, heap that leaks.

A soak run a minute in, with TPS and tick time on the left and both heaps on the right.
The Soak page: 10 bots for 2h in mixed style, +0 MB server memory since the start, and live charts for TPS, MSPT and server and tool heap

Run one

The Soak page starts runs and draws TPS, MSPT and both heaps live. Over HTTP:

curl -g "localhost:8767/soak/start?count=10&duration=2h&profile=mixed&seed=42&menus=/is|/warp"
curl "localhost:8767/soak/status"
curl "localhost:8767/soak/report?format=html" > soak.html

What the bots do

  • Walk to random spots near where they joined, with the pathfinder.
  • Dig soft blocks around them, and place blocks they picked up.
  • Open a menu from menus and close it after a second or two.
  • Say something in chat.
  • Pick up items lying around, or drop one.
  • Sleep in a bed within 16 blocks at night.
  • Look around and jump.
  • Now and then quit and rejoin.

A bot that dies respawns by itself. A bot that gets kicked comes back after 5 seconds.

Profiles

profileBehaviour
survivalRoams 20 blocks and leans on walking and digging
skyblockStays within 6 blocks, builds more and opens /is unless menus says otherwise
mixedHalf the swarm each

Weights

weights=wander:5,mine:2,reconnect:0 changes the chance of each action on top of the profile. The actions are wander, mine, place, menu, chat, items, sleep, idle and reconnect.

An action only comes up when it can happen: sleep needs night and a bed, place needs a block in the inventory.

Seed

seed fixes every bot's choices. Bot n gets its own stream from it. The same seed makes the same choices in the same situations; timing and the server still differ between runs. Without a seed the tool picks one and puts it in the report.

Samples

Every sample (30 s) the report gets:

  • bots online
  • server TPS and MSPT
  • server heap and tool heap
  • TPS as the bots see it, and ping
  • disconnects, deaths and planned reconnects
  • actions per minute
  • menu open p95

TPS and MSPT come like in load runs (health=auto, bot:<op bot> or none), every healthEvery (30 s). Heap comes from spark health (Paper ships spark) or an Essentials /memory, whichever answers.

The report flags four trends. Each needs 6 samples and a slope in the same direction.

TrendFlagged when
TPS decayThe last quarter of the run is at least 1 TPS below the first
Rising MSPTUp 25 percent and 2 ms
Growing server heapThe lowest reading of the last quarter is 15 percent and 32 MB above the lowest of the first quarter
Growing tool heapSame rule as the server heap

The heap rules look at the lowest reading because the heap is a saw and only its floor leaks.

The report

Filereport.jsonConfig keyreport.htmlreport.json and report.html land in soak/<job> in the data dir. They are rewritten every 5 minutes while the run goes, so a crash keeps what was there. /soak/report serves the last written one during a run.

Endpoints

EndpointParametersReturns
/soak/startcount=10, pattern=Soak_{n}, from, stagger=1000, duration=30m, profile=survival|skyblock|mixed, seed, weights, menus (split by |), pause=3s, sample=30s, healthEvery=30s, health=auto, host, port{"job":"soak-1",...}
/soak/statusjob, default the latestprogress and the latest sample
/soak/stopjobends the run, the report is still written
/soak/reportjob, format=json|htmlthe report
/soak/jobsevery soak run this session

Loading the index

Enter openUp Down moveEsc close