PerformanceMonitor 0.0.6

PerformanceMonitor 0.0.6

roy.cao维护。



  • roy

PerformanceMonitor

badge-pms badge-platforms badge-languages Swift Version

PerformanceMonitor是一个非侵入式的APM系统,包括监控CPU、内存、FPS,记录所有OC和Swift方法耗时等。

插件

  • CPUMonitor
  • MemoryMonitor
  • FPSMonitor
  • FluecyMonitor
  • SwiftTrace

功能

  • 监控CPU使用率,在使用率超过80%时记录当前线程调用栈
  • 监控内存使用
  • 监控FPS
  • 如果应用不够流畅,记录主线程调用栈
  • 记录所有OC和Swift方法耗时

注意:在采用全局优化编译的模块中,这些功能不会在final或internal类或方法上工作,因为方法的调用的分发将“直接”即直接链接到调用点的符号,而不是通过类的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

用法

设置

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

≈ 需求

  • iOS 8.0+
  • Swift 4.0-5.x

下一步

  • 使用TableView显示记录
  • 改进SwiftTrace,支持更多Swift方法

安装

Carthage

将以下行添加到您的 Cartfile

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

CocoaPods

CocoaPods 是 Cocoa 项目的依赖关系管理器。要使用 CocoaPods 将 Aspect 集成到您的 Xcode 项目中,请在您的 Podfile 中指定它

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

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

##感谢

SwiftTrace
GDPerformanceView-Swift
SystemEye
AppPerformance

许可

Aspect 根据 MIT 许可证发布。请参阅 LICENSE 获取详细信息。