Files
knowledge-kit/Chapter1 - iOS/collection.md
2020-07-06 04:55:47 +08:00

6.8 KiB
Raw Blame History

APM

内存泄露检测 各家都是基于 Facebook 的 FBRetainCycleDetector 实现,有: 腾讯 MLeaksFinder https://github.com/Tencent/MLeaksFinder PLeakSniffer https://github.com/music4kid/PLeakSniffer LeaksMonitor https://github.com/tripleCC/Laboratory/tree/master/LeaksMonitor

ANR 检测 ANR 检测相对比较简单,各家原理基本相同。新建一个 thread 在 threshold 的间隔时间内(一般 200 - 400毫秒循环等待一个 semaphore并从主线程 async dispatch semaphore 的 signal 函数,如果超时则报卡顿。

  1. https://gist.github.com/leilee/3275b94c381114332242978fc4366591
  2. https://gist.github.com/Adlai-Holler/ea7e3e98333b3b84f13d19b169ccf989
  3. https://gist.github.com/mikeash/5172803 这个是纯 GCD 的实现
  4. https://gist.github.com/steipete/5664345 PFPDFKit 里用的是这个
  5. https://gist.github.com/jspahrsummers/419266f5231832602bec GitHub 客户端里用的
  6. https://github.com/wojteklu/Watchdog 这个有用 atomic_store 和 atomic_load 实现死锁回调
  7. DoKit
  8. https://github.com/ming1016/study/wiki/检测iOS的APP性能的一些方法 启动优化 《Reducing Your App's Launch Time》- Apple https://developer.apple.com/documentation/xcode/improving_your_app_s_performance/reducing_your_app_s_launch_time 《抖音研发实践:基于二进制文件重排的解决方案 APP启动速度提升超15%》 https://mp.weixin.qq.com/s?__biz=MzI1MzYzMjE0MQ==&mid=2247485101&idx=1&sn=abbbb6da1aba37a04047fc210363bcc9&scene=21#wechat_redirect // 这种纬度的启动时间优化对小公司来说 ROI 太低 《美团外卖 iOS App 冷启动治理》 https://tech.meituan.com/2018/12/06/waimai-ios-optimizing-startup.html

测量进程的 uptime https://github.com/tripleCC/Laboratory/blob/master/ProcessStartTime/ProcessStartTime/main.m https://stackoverflow.com/questions/40649964/ios-get-self-process-start-time-after-the-fact/40677286

滴滴出行 DoraemonKit https://github.com/didi/DoraemonKit 功能非常多,感觉侧重了 UI 的运行时调试。APM 的部分主要依赖第三方库,如 MLeakFinder。有提供问题上报机制所以会有不少额外的网络请求发送到 dokit 的API。

腾讯 Matrix https://github.com/tencent/matrix 功能精简,只有 ANR 和内存检测。

美图秀秀 MTHawkeye https://github.com/meitu/MTHawkeye/tree/develop/MTHawkeye 监控项目比 DoKit 多ANR 中能看到主线程堆栈信息,网络层有做一些基本优化指标的监控。

阿里巴巴 GodEye https://github.com/zixun/GodEye 项目已经三年没有维护,不过作者的小专栏有提供整体思路,值得参考学习。https://xiaozhuanlan.com/godeye

技术博客

AloneMonkey http://www.alonemonkey.com/ https://github.com/AloneMonkey #ios #re yulingtianxia https://yulingtianxia.com/ https://github.com/yulingtianxia #ios #ml SatanWoo http://satanwoo.github.io/ https://github.com/SatanWoo #ios #ml Naville Zhang https://mayuyu.io/ https://github.com/Naville #ios #re #llvm Cocoa Oikawa https://blog.0xbbc.com/ https://github.com/BlueCocoa #ios jmpews https://jmpews.github.io https://github.com/jmpews #ios #re kov4l3nko https://kov4l3nko.github.io https://github.com/kov4l3nko #ios mikeash https://www.mikeash.com/pyblog/ #ios NSBLOGGING https://kandelvijaya.com/post/ #ios 4ch12dy http://4ch12dy.site/ https://github.com/4ch12dy ibireme https://blog.ibireme.com/ https://github.com/ibireme/ #ios bang http://blog.cnbang.net/ https://github.com/bang590 #ios everettjf https://everettjf.github.io/ https://github.com/everettjf #ios #re Gityuan http://gityuan.com/ #android #flutter Meituan https://tech.meituan.com/ #ios #android #company draveness https://draveness.me/ #ios #golang chy305chy https://chy305chy.github.io/ #ios Urinx https://urinx.github.io/v6/ https://github.com/Urinx #ios #re bdunagan http://bdunagan.com/ #ios la0s https://la0s.github.io/ #re #ios caijinglong https://www.kikt.top/ #flutter weishu http://weishu.me/ https://github.com/tiann #android #re zixia https://github.com/huan #ml #re xelz https://github.com/xelzmm http://xelz.info/ #re ChiChou https://github.com/ChiChou https://blog.chichou.me/ #re

学习

资料

文章

如何对 iOS 启动阶段耗时进行分析 objc_msgSend Hook 精简学习过程 如何对 iOS 启动阶段耗时进行分析 App 启动速度怎么做优化与监控? 监控所有的OC方法耗时 Hook objc_msgSend to hotfix

iOS App启动优化—— 了解App的启动流程 iOS App启动优化—— 使用“Time Profiler”工具监控App的启动耗时 iOS App启动优化—— 自己做一个工具监控App的启动耗时

优化 App 的启动时间 深入理解App的启动过程 iOS启动速度优化 iOS app启动速度研究实践 iOS Dynamic Framework 对App启动时间影响实测 iOS App 启动性能优化 今日头条iOS客户端启动速度优化 如何精确度量 iOS App 的启动时间 iOS App冷启动治理来自美团外卖的实践