Swiftpack.co -  dani-gavrilov/GDPerformanceView-Swift as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Shows FPS, CPU and memory usage, device model, app and iOS versions above the status bar and report FPS, CPU and memory usage via delegate.
.package(url: "https://github.com/dani-gavrilov/GDPerformanceView-Swift.git", from: "2.1.1")


Shows FPS, CPU and memory usage, device model, app and iOS versions above the status bar and report FPS, CPU and memory usage via delegate.

Carthage compatible Pod Version Swift Version Swift Version Swift Version Plaform License MIT

Alt text Alt text Alt text Alt text


Simply add GDPerformanceMonitoring folder with files to your project, or use CocoaPods.


Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/GDPerformanceView.framework to an iOS project.

github "dani-gavrilov/GDPerformanceView-Swift" ~> 2.1.1

Don't forget to import GDPerformanceView by adding:

import GDPerformanceView


You can use CocoaPods to install GDPerformanceView by adding it to your Podfile:

platform :ios, '8.0'

target 'project_name' do
	pod 'GDPerformanceView-Swift', '~> 2.1.1'

Don't forget to import GDPerformanceView by adding:

import GDPerformanceView_Swift

Usage example

Simply start monitoring. Performance view will be added above the status bar automatically. Also, you can configure appearance as you like or just hide the monitoring view and use its delegate.

You can find example projects here.

Start monitoring

By default, monitoring is paused. Call the following command to start or resume monitoring:



self.performanceView = PerformanceMonitor()
self.performanceView?. start()

This won't show the monitoring view if it was hidden previously. To show it call the following command:


Pause monitoring

Call the following command to pause monitoring:


This won't hide the monitoring view. To hide it call the following command:


Displayed information

You can change displayed information by changing options of the performance monitor:

self.performanceView?.performanceViewConfigurator.options = .all

You can choose from:

  • performance - CPU usage and FPS.
  • memory - Memory usage.
  • application - Application version with build number.
  • device - Device model.
  • system - System name with version.

Also you can mix them, but order doesn't matter:

self.performanceView?.performanceViewConfigurator.options = [.performance, .application, .system]

By default, set of [.performance, .application, .system] options is used.

You can also add your custom information by using:

self.performanceView?.performanceViewConfigurator.userInfo = .custom(string: "Launch date \(Date())")

Keep in mind that custom string will not automatically fit the screen, use \n if it is too long.


You can change monitoring view appearance by changing style of the performance monitor:

Call the following command to change output information:

self.performanceView?.performanceViewConfigurator.style = .dark

You can choose from:

  • dark - Black background, white text.
  • light - White background, black text.
  • custom - You can set background color, border color, border width, corner radius, text color and font.

By default, dark style is used.

Also you can override prefersStatusBarHidden and preferredStatusBarStyle to match your expectations:

self.performanceView?.statusBarConfigurator.statusBarHidden = false
self.performanceView?.statusBarConfigurator.statusBarStyle = .lightContent


You can interact with performance view via gesture recognizers. Add them by using:

self.performanceView?.performanceViewConfigurator.interactors = [tapGesture, swipeGesture]

If interactors is nil or empty point(inside:with:) of the view will return false to make all touches pass underneath. So to remove interactors just call the following command:

self.performanceView?.performanceViewConfigurator.interactors = nil

By default, interactors are nil.


Set the delegate and implement its method:

self.performanceView?.delegate = self
func performanceMonitor(didReport performanceReport: PerformanceReport) {
	print(performanceReport.cpuUsage, performanceReport.fps, performanceReport.memoryUsage.used, performanceReport.memoryUsage.total)


  • iOS 9.0+
  • xCode 12.0+


Wanna say thanks? You can do it using Patreon.


Daniil Gavrilov - VK - FB

I will be pleased to know that your project uses this framework. You can send a link to your project in App Store to my email - daniilmbox@gmail.com.


GDPerformanceView is available under the MIT license. See the LICENSE file for more info.


Stars: 2036
Last commit: 2 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

Fix crashes
32 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API