Skip to content

Swift PerformanceMonitor for iOS & macOS apps, track CPU, RAM, FPS & Thermal State with ease

Notifications You must be signed in to change notification settings

IgorMuzyka/PerformanceMonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Performance Monitor

Swift Version iOS Version macOS Version

Preview

Dark Preview Light Preview

Usage

import PerformanceMonitor

// add it somewhere inside your root most SwiftUI View.
@State isPresented: Bool = false
var body: some View {
    NavigationStack {
        ...
    }
    .performanceMonitor(
        isPresented: $isPresented,
        shakeGestureTogglesPresentation: true,
        sizeClass: .compact
    )
}

// if you want to toggle it's presentation via button for example
PerformanceMonitor.shared.togglePresentation()  

Or just shake your iOS device from side to side, if you didn't pass false to shakeGestureTogglesPresentation.

Installation

dependencies: [
    .package(url: "https://github.com/IgorMuzyka/PerformanceMonitor", .upToNextMajor(from: "1.0.0")),
]

Acknowledgements

This project was heavily inspired by this GDPerformanceView-Swift.

About

Swift PerformanceMonitor for iOS & macOS apps, track CPU, RAM, FPS & Thermal State with ease

Topics

Resources

Stars

Watchers

Forks

Languages