Venusanticheat docs

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

xyz.kaosmc.anticheat.api.server.profiler.Monitor
SignatureDescription
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

xyz.kaosmc.anticheat.api.server.profiler.Statistic
SignatureDescription
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.
reading the profiler from a plugin
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.