Awesome Open Source
Awesome Open Source


Shows your current framerate (fps) in the status bar of your iOS app

Be a good citizen! Don't block your main thread!

Build Status Cocoapods Version CocoaPods Platform Carthage Compatible Twitter

WatchdogInspector counts your app's framerate and displays the fps in the status bar. The coloured status bar lets you know when your framerate drops below 60 fps. If everything is fine your status bar gets happy and will stay green. To detect unwanted main thread stalls you can set a custom watchdog timeout.


  • Status bar displays the current framerate in fps (measured every 2 seconds)
  • Colours the status bar from green (good fps) to red (bad fps)
  • Custom watchdog timeout: Exception when main thread stalls for a defined time




pod "WatchdogInspector"

and run pod install You can see the example project how to setup and run WatchdogInspector Make sure that you don't use WatchdogInspector in production.


You can use Carthage. Specify in Cartfile:

github "tapwork/WatchdogInspector"


Objective-C | Swift


After launch or whenever you want.

import WatchdogInspector
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        return true

####Stop To stop it just call


Main Thread Stalling Exceptions

You can set a custom watchdog timeout for stalling exceptions (Default: 3 seconds)


You could also disable the Main Thread exceptions


####Logging To log all measured framerates you can log them in the console by calling (Default: on)


How it works

There are basically two timers running to measure the framerate.

  1. The background thread timer fires every 2 seconds to count how many frames were set by the main thread. Ideally the result would be 120 frames in 2 seconds to get 60 fps. The background timer resets the frames counter every event. He also sends the measured fps to the status bar on the main thread.

  2. The main thread timer should fire every 1/60 second (60 fps is optimum for a smooth animation) to increment the frames counter. If the main thread is blocked and can't run every 1/60 second the framerate will drop the 60 fps.

There is also a run loop observer running to detect main thread stalls for a defined timeout. If the timeout has been reached an exception will be thrown.

Related projects




Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Objective C (110,692
Ios (19,329
Monitoring (4,124
Performance (2,527
Cocoapods (1,975
Uikit (1,575
Thread (931
Carthage (817
Performance Analysis (391
Fps (233
Performance Monitoring (206
Watchdog (156
Related Projects