Base URL of the Rhino Compute server with http:// or https:// scheme (e.g., 'http://localhost:6500')
OptionalapiKey: stringOptional API key for authentication
Disposes of all resources and stops all active monitors. Call this when you're done using the stats instance.
Get the number of active child processes on the server.
Number of active children, or null if unavailable
Get comprehensive server statistics. Fetches all available server information in parallel.
Object containing server status and available stats
Get the server version information.
Version object with rhino, compute, and git_sha, or null if unavailable
Check if the server is online.
This is a single-sample probe: it returns true only on a 2xx from
/healthcheck, and false for every other outcome (non-2xx, network
error, or timeout). A cold or briefly-busy-but-up server can therefore
read as offline — callers that gate on this (e.g. client construction)
should retry rather than treat a single false as authoritative.
Abort the probe after this many ms (default: 5000).
Pass 0 to disable the timeout. Prevents a hung connection from
stalling the caller indefinitely.
Continuously monitor server stats at specified interval.
Function called with stats on each interval
Milliseconds between checks (default: 5000)
Function to stop monitoring
Purge the server's solve-results / URL-data cache.
POSTs to cache/purge and returns the number of entries removed, or null
if the request failed. This clears cached solve responses and fetched
definition-URL data; it does NOT evict the definition cache (active
pointer references stay valid).
Caveat: cache/purge is forwarded by the rhino.compute proxy to a
single round-robin-selected child, so in a multi-child deployment one call
purges one child's cache. Call repeatedly (or size the pool to 1) if you
need a fleet-wide purge.
Number of entries removed, or null on failure.
ComputeServerStats provides methods to query Rhino Compute server statistics.
Use this for server health monitoring and statistics.
Example