Skip to content

PerformanceMonitor is a non-invasive APM system, Including monitoring CPU,Memory,FPS,Recording all OC and Swift methods time consuming,etc.

License

Notifications You must be signed in to change notification settings

woshiccm/PerformanceMonitor

Repository files navigation

PerformanceMonitor

badge-pms badge-platforms badge-languages Swift Version

PerformanceMonitor is a non-invasive APM system, Including monitoring CPU,Memory,FPS,Recording all OC and Swift methods time consuming,etc.

Plugin

  • CPUMonitor
  • MemoryMonitor
  • FPSMonitor
  • FluecyMonitor
  • SwiftTrace

Features

  • Monitor cup usage, record current thread call stack if the usage rate exceeds 80%
  • Monitor memory usage
  • Monitor fps
  • Record main thread call stack if app is not fluecy
  • Record all OC and Swift methods time consuming

Note: none of these features will work on a class or method that is final or internal in a module compiled with whole module optimisation as the dispatch of the method will be "direct" i.e. linked to a symbol at the call site rather than going through the class' vtable.

Screen Shot 2019-09-08 at 4.09.41 PM.png

Screen Shot 2019-09-10 at 6.10.47 PM.png

Screen Shot 2019-09-10 at 6.11.04 PM.png

Usage

setup

RCBacktrace.setup()
performanceMonitor = PerformanceMonitor(displayOptions: [.cpu, .memory, .fps, .fluecy])
performanceMonitor?.start()
SwiftTrace.traceBundle(containing: type(of: self))

≈ Requirements

  • iOS 8.0+
  • Swift 4.0-5.x

Next Steps

  • Use TableView to show records
  • Improve SwiftTrace, support more Swift methods

Installation

Carthage

Add the following line to your Cartfile

git "https://github.com/woshiccm/PerformanceMonitor.git" "0.0.1"

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. To integrate Aspect into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target 'xxxx' do
    pod 'PerformanceMonitor', '~> 0.0.5'
end

##Thanks

SwiftTrace
GDPerformanceView-Swift
SystemEye
AppPerformance

License

Aspect is released under the MIT license. See LICENSE for details.

About

PerformanceMonitor is a non-invasive APM system, Including monitoring CPU,Memory,FPS,Recording all OC and Swift methods time consuming,etc.

Resources

License

Stars

Watchers

Forks

Packages

No packages published