Monitor and Statistic
Venus’ own timings: rolling statistics over the four hot paths, exposed read-only.
Reach it through api.server().monitor(). The monitor samples where Venus spends its time; each Statistic is one rolling timeline. Values are plain doubles — no units beyond “microseconds as the platform reports them” — so treat them as comparative numbers, not as a benchmark.
Monitor
| Signature | Description |
|---|---|
Statistic tickTimings() | The Venus tick loop itself. |
Statistic playerTimings() | Per-player processing. |
Statistic predictionTimings() | The prediction engine — usually the biggest cost. |
Statistic storeTimings() | Datastore writes and maintenance. |
Statistic
| Signature | Description |
|---|---|
double runningAverage() | Mean over the rolling window. |
double runningMedian() | Median — robust against lag spikes. |
double runningDeviation() | Spread; a growing value means timings are getting uneven. |
long sampleCount() | Samples taken so far; 0 until the window fills. |
Monitor monitor = api.server().monitor();
Statistic prediction = monitor.predictionTimings();
sender.sendMessage(String.format(
"prediction avg=%.2f med=%.2f sd=%.2f (n=%d)",
prediction.runningAverage(),
prediction.runningMedian(),
prediction.runningDeviation(),
prediction.sampleCount()));Reading the numbers
- average vs median — if the average sits well above the median, spikes are skewing it; look at what runs alongside Venus (world saves, other plugins).
- deviation — steady timings matter more than small ones. A rising deviation with a flat median usually means a periodic task is colliding with Venus's tick.
- sampleCount — still climbing means you are reading a fresh window; compare only after it stabilises.
More server accessors on the Server interface.