Overview
Hotkeys, timers and watchers all run on the main thread, so any blocking
call (a slow accessibility query, hs.execute, a synchronous search) delays
everything queued behind it. StallWatchdog runs a short repeating timer and
warns in the Console whenever a tick arrives late, so the latency you feel
can be matched to whatever was running at that moment.
Download: https://github.com/hugoh/StallWatchdog.spoon/releases/latest
Variables
Seconds between watchdog ticks (default: 0.05).
Seconds a tick may arrive late before it is logged as a stall (default: 0.1).
Seconds between summary lines in the Console: ticks, stalls, worst stall and
Lua memory since the previous report. Set to false to disable (default: 60).
Methods
Called automatically by hs.loadSpoon(). Logs the loaded version.
Returns whether the watchdog is currently running.
Starts the watchdog. Time spent stopped is never reported as a stall.
Returns
- The StallWatchdog object, for method chaining
Stops the watchdog.
Returns
- The StallWatchdog object, for method chaining
Starts the watchdog if it is stopped, stops it otherwise, and logs the new state.
Handy from the Hammerspoon Console: spoon.StallWatchdog:toggle().
Returns
- true if the watchdog is now running
Sets interval, threshold and/or reportInterval from a table. A running watchdog is
restarted so a new interval takes effect.
Parameters
opts- a table withinterval,thresholdand/orreportIntervalkeys, in seconds
Returns
- The StallWatchdog object, for method chaining