Menu
Reference
- Manticore\Ds
- Async
- Classes
- AggregateError
- CancellationToken
- CancelledException
- Channel
- ChannelClosedException
- Context
- DeadlockException
- Mutex
- Once
- Pool
- Received
- SelectCase
- Selected
- Semaphore
- Settled
- Task
- TaskGroup
- TimeoutException
- Functions
- async()
- awaitAll()
- awaitAllSettled()
- awaitAny()
- channel()
- delay()
- dump()
- dumpOn()
- failure()
- group()
- mapConcurrent()
- mapSettled()
- readFile()
- select()
- selectNow()
- selectWithin()
- shield()
- shutdownOn()
- spawn()
- stats()
- timeout()
- watchdog()
- writeFile()
- Http
- Http\WebSocket
- Buffer
- Process
- Io\Poll
- Manticore\Sapi
- Ffi
stats()
function
function stats(): array
Engine counters.
Monotonic totals (spawned, settled, cancelled, wakes, reactor_waits, timer_fires, watchdog, offloaded), the blocking-pool size (pool_threads) and the current gauges (live, ready, io_parked, timers). Useful for benchmarks and for asserting engine behaviour in a test, e.g. that a run did not silently fall back to polling, or that the watchdog fired exactly once. live is the gauge to alert on when tasks pile up.
Returns
array<string,int> — the counters by name; empty outside a running engine
See also: dump