A Swift class that logs excessive blocking on the main thread to help identify performance issues in iOS/macOS/tvOS apps.
Watchdog is a Swift library that monitors the main thread in iOS, macOS, and tvOS applications to detect and log excessive blocking that can cause UI stuttering. It helps developers identify performance bottlenecks by alerting when the main thread is blocked longer than a defined threshold, and can optionally halt execution for debugging.
iOS, macOS, and tvOS developers who need to ensure smooth UI performance and debug main thread blocking issues in their Swift applications.
Developers choose Watchdog for its simplicity and effectiveness in catching main thread blocks without overhead, offering configurable thresholds and a strict mode for immediate debugging, unlike manual instrumentation.
Class for logging excessive blocking on the main thread
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Setup is straightforward with instantiation in a few lines of code, supported by clear examples in the README for Carthage and CocoaPods.
Allows custom blocking durations (e.g., 0.4 seconds) to match specific performance needs, enabling targeted monitoring for UI responsiveness.
Optional strict mode halts execution when thresholds are exceeded, letting developers inspect exact code blocks causing issues, as highlighted in the usage section.
Works on iOS, macOS, and tvOS, with badges in the README indicating broad compatibility within the Apple development ecosystem.
The README explicitly warns developers to retain Watchdog instances to avoid release, adding memory management complexity and potential for bugs if overlooked.
Only monitors the main thread, ignoring background thread blocking that can also impact app performance, which limits its usefulness for comprehensive profiling.
Strict mode stops app execution, which is useful for debugging but risks crashes if enabled in production, requiring careful configuration management.