{"id":905,"date":"2026-02-11T11:06:10","date_gmt":"2026-02-11T03:06:10","guid":{"rendered":"https:\/\/www.ixriver.com\/?p=905"},"modified":"2026-02-11T11:06:10","modified_gmt":"2026-02-11T03:06:10","slug":"ios-%e6%80%a7%e8%83%bd%e5%b7%a5%e5%85%b7","status":"publish","type":"post","link":"https:\/\/www.v.ixriver.com\/?p=905","title":{"rendered":"iOS \u6027\u80fd\u5de5\u5177"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_65 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#iOS_%E6%80%A7%E8%83%BD%E5%B7%A5%E5%85%B7\" title=\"iOS \u6027\u80fd\u5de5\u5177\">iOS \u6027\u80fd\u5de5\u5177<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E7%9B%AE%E5%BD%95\" title=\"\u76ee\u5f55\">\u76ee\u5f55<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E6%A6%82%E8%A7%88\" title=\"\u6982\u89c8\">\u6982\u89c8<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E5%B7%A5%E5%85%B7%E5%88%86%E7%B1%BB\" title=\"\u5de5\u5177\u5206\u7c7b\">\u5de5\u5177\u5206\u7c7b<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E5%AE%98%E6%96%B9%E5%B7%A5%E5%85%B7\" title=\"\u5b98\u65b9\u5de5\u5177\">\u5b98\u65b9\u5de5\u5177<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E7%AC%AC%E4%B8%89%E6%96%B9%E5%B7%A5%E5%85%B7\" title=\"\u7b2c\u4e09\u65b9\u5de5\u5177\">\u7b2c\u4e09\u65b9\u5de5\u5177<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E5%BF%AB%E9%80%9F%E7%B4%A2%E5%BC%95\" title=\"\u5feb\u901f\u7d22\u5f15\">\u5feb\u901f\u7d22\u5f15<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E5%B7%A5%E5%85%B7%E9%80%89%E6%8B%A9%E5%BB%BA%E8%AE%AE\" title=\"\u5de5\u5177\u9009\u62e9\u5efa\u8bae\">\u5de5\u5177\u9009\u62e9\u5efa\u8bae<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E4%B8%9A%E7%95%8C%E6%88%90%E7%86%9F%E5%B7%A5%E5%85%B7%E5%AF%B9%E6%AF%94\" title=\"\u4e1a\u754c\u6210\u719f\u5de5\u5177\u5bf9\u6bd4\">\u4e1a\u754c\u6210\u719f\u5de5\u5177\u5bf9\u6bd4<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E4%B8%80%E3%80%81%E5%AE%98%E6%96%B9%E5%B7%A5%E5%85%B7\" title=\"\u4e00\u3001\u5b98\u65b9\u5de5\u5177\">\u4e00\u3001\u5b98\u65b9\u5de5\u5177<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#11_Xcode_Instruments\" title=\"1.1 Xcode Instruments\">1.1 Xcode Instruments<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#111_%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8\" title=\"1.1.1 \u57fa\u672c\u4f7f\u7528\">1.1.1 \u57fa\u672c\u4f7f\u7528<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E5%91%BD%E4%BB%A4%E8%A1%8C%E4%BD%BF%E7%94%A8\" title=\"\u547d\u4ee4\u884c\u4f7f\u7528\">\u547d\u4ee4\u884c\u4f7f\u7528<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#GUI_%E4%BD%BF%E7%94%A8\" title=\"GUI \u4f7f\u7528\">GUI \u4f7f\u7528<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#112_CPU_%E5%88%86%E6%9E%90\" title=\"1.1.2 CPU \u5206\u6790\">1.1.2 CPU \u5206\u6790<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#System_Trace\" title=\"System Trace\">System Trace<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Time_Profiler\" title=\"Time Profiler\">Time Profiler<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#System_Load\" title=\"System Load\">System Load<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#System_Call_Tree\" title=\"System Call Tree\">System Call Tree<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Thread_State_Trace\" title=\"Thread State Trace\">Thread State Trace<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#CPU_Counter\" title=\"CPU Counter\">CPU Counter<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#CPU_Profiler\" title=\"CPU Profiler\">CPU Profiler<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Activity_Monitor%EF%BC%88%E6%B4%BB%E5%8A%A8%E7%9B%91%E8%A7%86%E5%99%A8%EF%BC%89\" title=\"Activity Monitor\uff08\u6d3b\u52a8\u76d1\u89c6\u5668\uff09\">Activity Monitor\uff08\u6d3b\u52a8\u76d1\u89c6\u5668\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#GCD_Performance\" title=\"GCD Performance\">GCD Performance<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#113_%E5%86%85%E5%AD%98%E5%88%86%E6%9E%90\" title=\"1.1.3 \u5185\u5b58\u5206\u6790\">1.1.3 \u5185\u5b58\u5206\u6790<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Leaks\" title=\"Leaks\">Leaks<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Allocations\" title=\"Allocations\">Allocations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Virtual_Memory_Trace\" title=\"Virtual Memory Trace\">Virtual Memory Trace<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#VM_Tracker\" title=\"VM Tracker\">VM Tracker<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#114_IO_%E5%88%86%E6%9E%90\" title=\"1.1.4 IO \u5206\u6790\">1.1.4 IO \u5206\u6790<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Disk_IO_Latency\" title=\"Disk I\/O Latency\">Disk I\/O Latency<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-32\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Disk_Usage\" title=\"Disk Usage\">Disk Usage<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-33\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Filesystem_Suggestions\" title=\"Filesystem Suggestions\">Filesystem Suggestions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-34\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Filesystem_Activity\" title=\"Filesystem Activity\">Filesystem Activity<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-35\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Core_Data_%E7%9B%B8%E5%85%B3%E5%B7%A5%E5%85%B7\" title=\"Core Data \u76f8\u5173\u5de5\u5177\">Core Data \u76f8\u5173\u5de5\u5177<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-36\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#115_%E5%8D%A1%E9%A1%BF%E5%88%86%E6%9E%90\" title=\"1.1.5 \u5361\u987f\u5206\u6790\">1.1.5 \u5361\u987f\u5206\u6790<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-37\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Hangs\" title=\"Hangs\">Hangs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-38\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Hitches\" title=\"Hitches\">Hitches<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-39\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Core_Animation_Commits%EF%BC%88%E6%A0%B8%E5%BF%83%E5%8A%A8%E7%94%BB%E6%8F%90%E4%BA%A4%EF%BC%89\" title=\"Core Animation Commits\uff08\u6838\u5fc3\u52a8\u753b\u63d0\u4ea4\uff09\">Core Animation Commits\uff08\u6838\u5fc3\u52a8\u753b\u63d0\u4ea4\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-40\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Core_Animation_FPS%EF%BC%88%E6%A0%B8%E5%BF%83%E5%8A%A8%E7%94%BB%E5%B8%A7%E7%8E%87%EF%BC%89\" title=\"Core Animation FPS\uff08\u6838\u5fc3\u52a8\u753b\u5e27\u7387\uff09\">Core Animation FPS\uff08\u6838\u5fc3\u52a8\u753b\u5e27\u7387\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-41\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Advanced_Graphics_Statistics%EF%BC%88%E9%AB%98%E7%BA%A7%E5%9B%BE%E5%BD%A2%E7%BB%9F%E8%AE%A1%EF%BC%89\" title=\"Advanced Graphics Statistics\uff08\u9ad8\u7ea7\u56fe\u5f62\u7edf\u8ba1\uff09\">Advanced Graphics Statistics\uff08\u9ad8\u7ea7\u56fe\u5f62\u7edf\u8ba1\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-42\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Display%EF%BC%88%E6%98%BE%E7%A4%BA%EF%BC%89\" title=\"Display\uff08\u663e\u793a\uff09\">Display\uff08\u663e\u793a\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-43\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Runloops\" title=\"Runloops\">Runloops<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-44\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#116_%E8%83%BD%E8%80%97%E5%88%86%E6%9E%90\" title=\"1.1.6 \u80fd\u8017\u5206\u6790\">1.1.6 \u80fd\u8017\u5206\u6790<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-45\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Energy_Log\" title=\"Energy Log\">Energy Log<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-46\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#12_XCTest_XCTMetric\" title=\"1.2 XCTest + XCTMetric\">1.2 XCTest + XCTMetric<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-47\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#13_Metal_Performance_HUD\" title=\"1.3 Metal Performance HUD\">1.3 Metal Performance HUD<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-48\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E4%BA%8C%E3%80%81%E7%AC%AC%E4%B8%89%E6%96%B9%E5%B7%A5%E5%85%B7\" title=\"\u4e8c\u3001\u7b2c\u4e09\u65b9\u5de5\u5177\">\u4e8c\u3001\u7b2c\u4e09\u65b9\u5de5\u5177<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-49\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#21_%E8%AE%BE%E5%A4%87%E7%AE%A1%E7%90%86%E5%B7%A5%E5%85%B7\" title=\"2.1 \u8bbe\u5907\u7ba1\u7406\u5de5\u5177\">2.1 \u8bbe\u5907\u7ba1\u7406\u5de5\u5177<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-50\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#211_%E5%9F%BA%E6%9C%AC%E5%8E%9F%E7%90%86\" title=\"2.1.1 \u57fa\u672c\u539f\u7406\">2.1.1 \u57fa\u672c\u539f\u7406<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-51\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E6%95%B0%E6%8D%AE%E9%87%87%E9%9B%86%E6%96%B9%E5%BC%8F\" title=\"\u6570\u636e\u91c7\u96c6\u65b9\u5f0f\">\u6570\u636e\u91c7\u96c6\u65b9\u5f0f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-52\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E6%95%B0%E6%8D%AE%E8%AE%BF%E9%97%AE%E6%96%B9%E5%BC%8F\" title=\"\u6570\u636e\u8bbf\u95ee\u65b9\u5f0f\">\u6570\u636e\u8bbf\u95ee\u65b9\u5f0f<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-53\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#212_%E5%B7%A5%E5%85%B7%E4%BB%8B%E7%BB%8D\" title=\"2.1.2 \u5de5\u5177\u4ecb\u7ecd\">2.1.2 \u5de5\u5177\u4ecb\u7ecd<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-54\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#%E9%98%BF%E9%87%8C_tidevice\" title=\"\u963f\u91cc tidevice\">\u963f\u91cc tidevice<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-55\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Facebook_idb\" title=\"Facebook idb\">Facebook idb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-56\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#libimobiledevice\" title=\"libimobiledevice\">libimobiledevice<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-57\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#ifuse\" title=\"ifuse\">ifuse<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-58\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#22_%E7%BA%BF%E4%B8%8A%E7%9B%91%E6%8E%A7%E5%B7%A5%E5%85%B7%EF%BC%88APM%EF%BC%89\" title=\"2.2 \u7ebf\u4e0a\u76d1\u63a7\u5de5\u5177\uff08APM\uff09\">2.2 \u7ebf\u4e0a\u76d1\u63a7\u5de5\u5177\uff08APM\uff09<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-59\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#221_Firebase_Performance_Monitoring\" title=\"2.2.1 Firebase Performance Monitoring\">2.2.1 Firebase Performance Monitoring<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-60\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#222_Sentry_Mobile\" title=\"2.2.2 Sentry Mobile\">2.2.2 Sentry Mobile<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-61\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#223_New_Relic_Mobile\" title=\"2.2.3 New Relic Mobile\">2.2.3 New Relic Mobile<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-62\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#224_%E5%85%B6%E4%BB%96_APM_%E5%B7%A5%E5%85%B7\" title=\"2.2.4 \u5176\u4ed6 APM \u5de5\u5177\">2.2.4 \u5176\u4ed6 APM \u5de5\u5177<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-63\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Dynatrace\" title=\"Dynatrace\">Dynatrace<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-64\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#Datadog\" title=\"Datadog\">Datadog<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-65\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#AppDynamics\" title=\"AppDynamics\">AppDynamics<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-66\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#23_%E7%BD%91%E7%BB%9C%E8%B0%83%E8%AF%95%E5%B7%A5%E5%85%B7\" title=\"2.3 \u7f51\u7edc\u8c03\u8bd5\u5de5\u5177\">2.3 \u7f51\u7edc\u8c03\u8bd5\u5de5\u5177<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-67\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#231_Charles_Proxy\" title=\"2.3.1 Charles Proxy\">2.3.1 Charles Proxy<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-68\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#232_Proxyman\" title=\"2.3.2 Proxyman\">2.3.2 Proxyman<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-69\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#24_%E9%9D%99%E6%80%81%E6%89%AB%E6%8F%8F%E5%B7%A5%E5%85%B7\" title=\"2.4 \u9759\u6001\u626b\u63cf\u5de5\u5177\">2.4 \u9759\u6001\u626b\u63cf\u5de5\u5177<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-70\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#241_oclint\" title=\"2.4.1 oclint\">2.4.1 oclint<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-71\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#242_infer\" title=\"2.4.2 infer\">2.4.2 infer<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-72\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#243_clang-tidy\" title=\"2.4.3 clang-tidy\">2.4.3 clang-tidy<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-73\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#25_%E5%BC%80%E6%BA%90%E8%87%AA%E7%A0%94%E5%B7%A5%E5%85%B7\" title=\"2.5 \u5f00\u6e90\/\u81ea\u7814\u5de5\u5177\">2.5 \u5f00\u6e90\/\u81ea\u7814\u5de5\u5177<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-74\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#251_Bookingcom_PerformanceSuite\" title=\"2.5.1 Booking.com PerformanceSuite\">2.5.1 Booking.com PerformanceSuite<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-75\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#252_Swift-Metrics\" title=\"2.5.2 Swift-Metrics\">2.5.2 Swift-Metrics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-76\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#253_DBDebugToolkit\" title=\"2.5.3 DBDebugToolkit\">2.5.3 DBDebugToolkit<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-77\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#254_FBRetainCycleDetector\" title=\"2.5.4 FBRetainCycleDetector\">2.5.4 FBRetainCycleDetector<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-78\" href=\"https:\/\/www.v.ixriver.com\/?p=905\/#255_fishhook\" title=\"2.5.5 fishhook\">2.5.5 fishhook<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"iOS_%E6%80%A7%E8%83%BD%E5%B7%A5%E5%85%B7\"><\/span>iOS \u6027\u80fd\u5de5\u5177<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<h2><span class=\"ez-toc-section\" id=\"%E7%9B%AE%E5%BD%95\"><\/span>\u76ee\u5f55<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><a href=\"#ios-\u6027\u80fd\u5de5\u5177\">iOS \u6027\u80fd\u5de5\u5177<\/a><\/li>\n<li><a href=\"#\u76ee\u5f55\">\u76ee\u5f55<\/a><\/li>\n<li><a href=\"#\u6982\u89c8\">\u6982\u89c8<\/a>\n<ul>\n<li><a href=\"#\u5de5\u5177\u5206\u7c7b\">\u5de5\u5177\u5206\u7c7b<\/a><\/li>\n<li><a href=\"#\u5feb\u901f\u7d22\u5f15\">\u5feb\u901f\u7d22\u5f15<\/a><\/li>\n<li><a href=\"#\u5de5\u5177\u9009\u62e9\u5efa\u8bae\">\u5de5\u5177\u9009\u62e9\u5efa\u8bae<\/a><\/li>\n<li><a href=\"#\u4e1a\u754c\u6210\u719f\u5de5\u5177\u5bf9\u6bd4\">\u4e1a\u754c\u6210\u719f\u5de5\u5177\u5bf9\u6bd4<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#\u4e00\u5b98\u65b9\u5de5\u5177\">\u4e00\u3001\u5b98\u65b9\u5de5\u5177<\/a>\n<ul>\n<li><a href=\"#11-xcode-instruments\">1.1 Xcode Instruments<\/a><\/li>\n<li><a href=\"#111-\u57fa\u672c\u4f7f\u7528\">1.1.1 \u57fa\u672c\u4f7f\u7528<\/a>\n<ul>\n<li><a href=\"#\u547d\u4ee4\u884c\u4f7f\u7528\">\u547d\u4ee4\u884c\u4f7f\u7528<\/a><\/li>\n<li><a href=\"#gui-\u4f7f\u7528\">GUI \u4f7f\u7528<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#112-cpu-\u5206\u6790\">1.1.2 CPU \u5206\u6790<\/a>\n<ul>\n<li><a href=\"#system-trace\">System Trace<\/a><\/li>\n<li><a href=\"#time-profiler\">Time Profiler<\/a><\/li>\n<li><a href=\"#system-load\">System Load<\/a><\/li>\n<li><a href=\"#system-call-tree\">System Call Tree<\/a><\/li>\n<li><a href=\"#thread-state-trace\">Thread State Trace<\/a><\/li>\n<li><a href=\"#cpu-counter\">CPU Counter<\/a><\/li>\n<li><a href=\"#cpu-profiler\">CPU Profiler<\/a><\/li>\n<li><a href=\"#activity-monitor\u6d3b\u52a8\u76d1\u89c6\u5668\">Activity Monitor\uff08\u6d3b\u52a8\u76d1\u89c6\u5668\uff09<\/a><\/li>\n<li><a href=\"#gcd-performance\">GCD Performance<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#113-\u5185\u5b58\u5206\u6790\">1.1.3 \u5185\u5b58\u5206\u6790<\/a>\n<ul>\n<li><a href=\"#leaks\">Leaks<\/a><\/li>\n<li><a href=\"#allocations\">Allocations<\/a><\/li>\n<li><a href=\"#virtual-memory-trace\">Virtual Memory Trace<\/a><\/li>\n<li><a href=\"#vm-tracker\">VM Tracker<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#114-io-\u5206\u6790\">1.1.4 IO \u5206\u6790<\/a>\n<ul>\n<li><a href=\"#disk-io-latency\">Disk I\/O Latency<\/a><\/li>\n<li><a href=\"#disk-usage\">Disk Usage<\/a><\/li>\n<li><a href=\"#filesystem-suggestions\">Filesystem Suggestions<\/a><\/li>\n<li><a href=\"#filesystem-activity\">Filesystem Activity<\/a><\/li>\n<li><a href=\"#core-data-\u76f8\u5173\u5de5\u5177\">Core Data \u76f8\u5173\u5de5\u5177<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#115-\u5361\u987f\u5206\u6790\">1.1.5 \u5361\u987f\u5206\u6790<\/a>\n<ul>\n<li><a href=\"#hangs\">Hangs<\/a><\/li>\n<li><a href=\"#hitches\">Hitches<\/a><\/li>\n<li><a href=\"#core-animation-commits\u6838\u5fc3\u52a8\u753b\u63d0\u4ea4\">Core Animation Commits\uff08\u6838\u5fc3\u52a8\u753b\u63d0\u4ea4\uff09<\/a><\/li>\n<li><a href=\"#core-animation-fps\u6838\u5fc3\u52a8\u753b\u5e27\u7387\">Core Animation FPS\uff08\u6838\u5fc3\u52a8\u753b\u5e27\u7387\uff09<\/a><\/li>\n<li><a href=\"#advanced-graphics-statistics\u9ad8\u7ea7\u56fe\u5f62\u7edf\u8ba1\">Advanced Graphics Statistics\uff08\u9ad8\u7ea7\u56fe\u5f62\u7edf\u8ba1\uff09<\/a><\/li>\n<li><a href=\"#display\u663e\u793a\">Display\uff08\u663e\u793a\uff09<\/a><\/li>\n<li><a href=\"#runloops\">Runloops<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#116-\u80fd\u8017\u5206\u6790\">1.1.6 \u80fd\u8017\u5206\u6790<\/a>\n<ul>\n<li><a href=\"#energy-log\">Energy Log<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#12-xctest--xctmetric\">1.2 XCTest + XCTMetric<\/a><\/li>\n<li><a href=\"#13-metal-performance-hud\">1.3 Metal Performance HUD<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#\u4e8c\u7b2c\u4e09\u65b9\u5de5\u5177\">\u4e8c\u3001\u7b2c\u4e09\u65b9\u5de5\u5177<\/a>\n<ul>\n<li><a href=\"#21-\u8bbe\u5907\u7ba1\u7406\u5de5\u5177\">2.1 \u8bbe\u5907\u7ba1\u7406\u5de5\u5177<\/a><\/li>\n<li><a href=\"#211-\u57fa\u672c\u539f\u7406\">2.1.1 \u57fa\u672c\u539f\u7406<\/a>\n<ul>\n<li><a href=\"#\u6570\u636e\u91c7\u96c6\u65b9\u5f0f\">\u6570\u636e\u91c7\u96c6\u65b9\u5f0f<\/a><\/li>\n<li><a href=\"#\u6570\u636e\u8bbf\u95ee\u65b9\u5f0f\">\u6570\u636e\u8bbf\u95ee\u65b9\u5f0f<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#212-\u5de5\u5177\u4ecb\u7ecd\">2.1.2 \u5de5\u5177\u4ecb\u7ecd<\/a>\n<ul>\n<li><a href=\"#\u963f\u91cc-tidevice\">\u963f\u91cc tidevice<\/a><\/li>\n<li><a href=\"#facebook-idb\">Facebook idb<\/a><\/li>\n<li><a href=\"#libimobiledevice\">libimobiledevice<\/a><\/li>\n<li><a href=\"#ifuse\">ifuse<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#22-\u7ebf\u4e0a\u76d1\u63a7\u5de5\u5177apm\">2.2 \u7ebf\u4e0a\u76d1\u63a7\u5de5\u5177\uff08APM\uff09<\/a><\/li>\n<li><a href=\"#221-firebase-performance-monitoring\">2.2.1 Firebase Performance Monitoring<\/a><\/li>\n<li><a href=\"#222-sentry-mobile\">2.2.2 Sentry Mobile<\/a><\/li>\n<li><a href=\"#223-new-relic-mobile\">2.2.3 New Relic Mobile<\/a><\/li>\n<li><a href=\"#224-\u5176\u4ed6-apm-\u5de5\u5177\">2.2.4 \u5176\u4ed6 APM \u5de5\u5177<\/a>\n<ul>\n<li><a href=\"#dynatrace\">Dynatrace<\/a><\/li>\n<li><a href=\"#datadog\">Datadog<\/a><\/li>\n<li><a href=\"#appdynamics\">AppDynamics<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#23-\u7f51\u7edc\u8c03\u8bd5\u5de5\u5177\">2.3 \u7f51\u7edc\u8c03\u8bd5\u5de5\u5177<\/a><\/li>\n<li><a href=\"#231-charles-proxy\">2.3.1 Charles Proxy<\/a><\/li>\n<li><a href=\"#232-proxyman\">2.3.2 Proxyman<\/a><\/li>\n<li><a href=\"#24-\u9759\u6001\u626b\u63cf\u5de5\u5177\">2.4 \u9759\u6001\u626b\u63cf\u5de5\u5177<\/a><\/li>\n<li><a href=\"#241-oclint\">2.4.1 oclint<\/a><\/li>\n<li><a href=\"#242-infer\">2.4.2 infer<\/a><\/li>\n<li><a href=\"#243-clang-tidy\">2.4.3 clang-tidy<\/a><\/li>\n<li><a href=\"#25-\u5f00\u6e90\u81ea\u7814\u5de5\u5177\">2.5 \u5f00\u6e90\/\u81ea\u7814\u5de5\u5177<\/a><\/li>\n<li><a href=\"#251-bookingcom-performancesuite\">2.5.1 Booking.com PerformanceSuite<\/a><\/li>\n<li><a href=\"#252-swift-metrics\">2.5.2 Swift-Metrics<\/a><\/li>\n<li><a href=\"#253-dbdebugtoolkit\">2.5.3 DBDebugToolkit<\/a><\/li>\n<li><a href=\"#254-fbretaincycledetector\">2.5.4 FBRetainCycleDetector<\/a><\/li>\n<li><a href=\"#255-fishhook\">2.5.5 fishhook<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"%E6%A6%82%E8%A7%88\"><\/span>\u6982\u89c8<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>iOS \u5e73\u53f0\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u6027\u80fd\u5206\u6790\u5de5\u5177\uff0c\u8986\u76d6\u5f00\u53d1\u8c03\u8bd5\u3001\u751f\u4ea7\u76d1\u63a7\u3001GPU \u5206\u6790\u7b49\u591a\u4e2a\u573a\u666f\u3002\u672c\u6587\u6863\u7cfb\u7edf\u6027\u5730\u4ecb\u7ecd\u4e86\u5404\u7c7b\u6027\u80fd\u5de5\u5177\u7684\u4f7f\u7528\u65b9\u6cd5\u548c\u6700\u4f73\u5b9e\u8df5\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E5%B7%A5%E5%85%B7%E5%88%86%E7%B1%BB\"><\/span>\u5de5\u5177\u5206\u7c7b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"%E5%AE%98%E6%96%B9%E5%B7%A5%E5%85%B7\"><\/span>\u5b98\u65b9\u5de5\u5177<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>Xcode Instruments<\/strong>\uff1a\u82f9\u679c\u5b98\u65b9\u63d0\u4f9b\u7684\u6027\u80fd\u5206\u6790\u5de5\u5177\u96c6\uff0c\u5305\u542b Time Profiler\uff08CPU\uff09\u3001Allocations\/Leaks\uff08\u5185\u5b58\uff09\u3001Energy Log\uff08\u80fd\u8017\uff09\u3001Core Animation\u3001Network\u3001File I\/O \u7b49\uff0c\u529f\u80fd\u5168\u9762\u4e14\u6df1\u5165\uff0c\u9002\u5408\u672c\u5730\u5f00\u53d1\u548c\u8c03\u8bd5\u9636\u6bb5\u3002<\/li>\n<li><strong>XCTest + XCTMetric<\/strong>\uff1a\u82f9\u679c\u5b98\u65b9\u6d4b\u8bd5\u6846\u67b6\uff0c\u652f\u6301\u6027\u80fd\u6d4b\u8bd5\u6307\u6807\uff08\u6267\u884c\u65f6\u95f4\u3001\u5185\u5b58\u3001CPU\uff09\uff0c\u53ef\u96c6\u6210 CI\/CD\uff0c\u9002\u5408\u81ea\u52a8\u5316\u6027\u80fd\u56de\u5f52\u68c0\u6d4b\u3002<\/li>\n<li><strong>Metal Performance HUD<\/strong>\uff1a\u82f9\u679c\u5b98\u65b9\u56fe\u5f62\u6027\u80fd\u8c03\u8bd5\u5de5\u5177\uff0c\u5b9e\u65f6\u663e\u793a\u6e32\u67d3\u5e27\u7387\u3001GPU \u5f00\u9500\u7b49\u56fe\u5f62\u76f8\u5173\u6307\u6807\uff0c\u9002\u5408\u6e38\u620f\u548c\u56fe\u5f62\u5bc6\u96c6\u578b\u5e94\u7528\u3002<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"%E7%AC%AC%E4%B8%89%E6%96%B9%E5%B7%A5%E5%85%B7\"><\/span>\u7b2c\u4e09\u65b9\u5de5\u5177<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li><strong>\u8bbe\u5907\u7ba1\u7406\u5de5\u5177<\/strong>\uff1atidevice\u3001Facebook idb\u3001libimobiledevice\u3001ifuse \u7b49\uff0c\u7528\u4e8e\u8bbe\u5907\u8fde\u63a5\u548c\u6570\u636e\u91c7\u96c6<\/li>\n<li><strong>\u7ebf\u4e0a\u76d1\u63a7\u5de5\u5177\uff08APM\uff09<\/strong>\uff1aFirebase Performance\u3001Sentry\u3001New Relic \u7b49\uff0c\u7528\u4e8e\u751f\u4ea7\u73af\u5883\u6027\u80fd\u76d1\u63a7<\/li>\n<li><strong>\u7f51\u7edc\u8c03\u8bd5\u5de5\u5177<\/strong>\uff1aCharles Proxy\u3001Proxyman \u7b49\uff0c\u7528\u4e8e\u7f51\u7edc\u95ee\u9898\u8bca\u65ad<\/li>\n<li><strong>\u9759\u6001\u626b\u63cf\u5de5\u5177<\/strong>\uff1aoclint\u3001infer\u3001clang-tidy \u7b49\uff0c\u7528\u4e8e\u4ee3\u7801\u8d28\u91cf\u68c0\u6d4b<\/li>\n<li><strong>\u5f00\u6e90\/\u81ea\u7814\u5de5\u5177<\/strong>\uff1aPerformanceSuite\u3001Swift-Metrics\u3001FBRetainCycleDetector \u7b49\uff0c\u7528\u4e8e\u81ea\u5b9a\u4e49\u76d1\u63a7\u65b9\u6848<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"%E5%BF%AB%E9%80%9F%E7%B4%A2%E5%BC%95\"><\/span>\u5feb\u901f\u7d22\u5f15<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u6309\u4f7f\u7528\u9636\u6bb5\u9009\u62e9<\/strong>\uff1a<\/p>\n<ul>\n<li><strong>\u5f00\u53d1\u9636\u6bb5<\/strong>\uff1aXcode Instruments + Metal Performance HUD\uff08\u56fe\u5f62\u5e94\u7528\uff09+ Charles\/Proxyman\uff08\u7f51\u7edc\u8c03\u8bd5\uff09<\/li>\n<li><strong>\u6d4b\u8bd5\u9636\u6bb5<\/strong>\uff1aXCTest + XCTMetric + Firebase Performance\uff08\u9884\u53d1\u5e03\u76d1\u63a7\uff09+ \u7f51\u7edc\u8c03\u8bd5\u5de5\u5177<\/li>\n<li><strong>\u751f\u4ea7\u73af\u5883<\/strong>\uff1aFirebase Performance \/ Sentry \/ New Relic\uff08APM\uff09+ PerformanceSuite\uff08\u81ea\u7814\u76d1\u63a7\uff09+ Crashlytics\uff08\u5d29\u6e83\u76d1\u63a7\uff09<\/li>\n<\/ul>\n<p><strong>\u6309\u95ee\u9898\u7c7b\u578b\u9009\u62e9<\/strong>\uff1a<\/p>\n<ul>\n<li><strong>CPU \u70ed\u70b9\u5206\u6790<\/strong>\uff1aTime Profiler\u3001System Trace<\/li>\n<li><strong>\u5185\u5b58\u6cc4\u6f0f<\/strong>\uff1aLeaks\u3001Allocations\u3001FBRetainCycleDetector<\/li>\n<li><strong>UI \u5361\u987f<\/strong>\uff1aCore Animation FPS\u3001Hitches\u3001Runloops<\/li>\n<li><strong>\u542f\u52a8\u65f6\u95f4<\/strong>\uff1aTime Profiler\u3001\u81ea\u5b9a\u4e49 trace<\/li>\n<li><strong>\u7f51\u7edc\u6027\u80fd<\/strong>\uff1aCharles\/Proxyman\u3001Network Link Conditioner<\/li>\n<li><strong>GPU \u6027\u80fd<\/strong>\uff1aMetal Performance HUD\u3001Core Animation Commits<\/li>\n<li><strong>\u80fd\u8017\u5206\u6790<\/strong>\uff1aEnergy Log<\/li>\n<\/ul>\n<p><strong>\u6309\u6027\u80fd\u5f00\u9500\u9009\u62e9<\/strong>\uff1a<\/p>\n<ul>\n<li><strong>\u4f4e\u5f00\u9500<\/strong>\uff1aFirebase Performance\uff08\u91c7\u6837\uff09\u3001XCTest\u3001\u9759\u6001\u626b\u63cf\u5de5\u5177<\/li>\n<li><strong>\u4e2d\u7b49\u5f00\u9500<\/strong>\uff1aSentry\uff08\u91c7\u6837 profiling\uff09\u3001New Relic\uff08\u91c7\u6837\uff09<\/li>\n<li><strong>\u9ad8\u5f00\u9500<\/strong>\uff1aInstruments\uff08\u5b8c\u6574\u914d\u7f6e\uff09\u3001AddressSanitizer<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"%E5%B7%A5%E5%85%B7%E9%80%89%E6%8B%A9%E5%BB%BA%E8%AE%AE\"><\/span>\u5de5\u5177\u9009\u62e9\u5efa\u8bae<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u4ee5\u4e0a\u5feb\u901f\u7d22\u5f15\u63d0\u4f9b\u4e86\u4e0d\u540c\u573a\u666f\u4e0b\u7684\u5de5\u5177\u9009\u62e9\u5efa\u8bae\u3002\u5177\u4f53\u5de5\u5177\u7684\u4f7f\u7528\u65b9\u6cd5\u548c\u8be6\u7ec6\u8bf4\u660e\u8bf7\u53c2\u8003\u540e\u7eed\u7ae0\u8282\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E4%B8%9A%E7%95%8C%E6%88%90%E7%86%9F%E5%B7%A5%E5%85%B7%E5%AF%B9%E6%AF%94\"><\/span>\u4e1a\u754c\u6210\u719f\u5de5\u5177\u5bf9\u6bd4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th>\u5de5\u5177\u540d\u79f0<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u4e3b\u8981\u529f\u80fd<\/th>\n<th>\u9002\u7528\u573a\u666f<\/th>\n<th>\u4f18\u52bf<\/th>\n<th>\u5c40\u9650<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Xcode Instruments<\/strong><\/td>\n<td>\u5b98\u65b9 Profiling<\/td>\n<td>CPU\u3001\u5185\u5b58\u3001GPU\u3001\u80fd\u8017\u3001\u7f51\u7edc\u3001I\/O \u5206\u6790<\/td>\n<td>\u672c\u5730\u5f00\u53d1\u8c03\u8bd5<\/td>\n<td>\u529f\u80fd\u5168\u9762\u3001\u6df1\u5165\u5e95\u5c42\u3001\u514d\u8d39<\/td>\n<td>\u5b66\u4e60\u66f2\u7ebf\u9661\u3001\u65e0\u6cd5\u7ebf\u4e0a\u76d1\u63a7<\/td>\n<\/tr>\n<tr>\n<td><strong>Firebase Performance<\/strong><\/td>\n<td>\u7ebf\u4e0a APM<\/td>\n<td>\u542f\u52a8\u65f6\u95f4\u3001\u7f51\u7edc\u5ef6\u8fdf\u3001\u5c4f\u5e55\u6e32\u67d3\u76d1\u63a7<\/td>\n<td>\u751f\u4ea7\u73af\u5883\u76d1\u63a7<\/td>\n<td>\u96c6\u6210\u7b80\u5355\u3001\u6210\u672c\u4f4e\u3001Google \u751f\u6001<\/td>\n<td>\u6df1\u5ea6\u8bca\u65ad\u80fd\u529b\u6709\u9650<\/td>\n<\/tr>\n<tr>\n<td><strong>Sentry<\/strong><\/td>\n<td>\u9519\u8bef+\u6027\u80fd\u76d1\u63a7<\/td>\n<td>\u5d29\u6e83\u3001\u6162\u4e8b\u52a1\u3001\u5361\u987f\u3001\u4ee3\u7801\u7ea7 profiling<\/td>\n<td>\u751f\u4ea7\u73af\u5883\u76d1\u63a7<\/td>\n<td>\u9519\u8bef\u548c\u6027\u80fd\u7edf\u4e00\u3001profiling \u80fd\u529b\u5f3a<\/td>\n<td>\u91c7\u6837\u7387\u9700\u63a7\u5236\u3001SDK \u5927\u5c0f\u9700\u8003\u8651<\/td>\n<\/tr>\n<tr>\n<td><strong>New Relic Mobile<\/strong><\/td>\n<td>\u4f01\u4e1a\u7ea7 APM<\/td>\n<td>\u5d29\u6e83\u3001\u7f51\u7edc\u8ddf\u8e2a\u3001\u6027\u80fd\u8d8b\u52bf\u3001\u5206\u5e03\u5f0f tracing<\/td>\n<td>\u5927\u578b\u5e94\u7528\u76d1\u63a7<\/td>\n<td>\u529f\u80fd\u5168\u9762\u3001\u591a\u7ef4\u5ea6\u5206\u6790<\/td>\n<td>\u6210\u672c\u9ad8\u3001\u96c6\u6210\u590d\u6742<\/td>\n<\/tr>\n<tr>\n<td><strong>Dynatrace<\/strong><\/td>\n<td>\u4f01\u4e1a\u7ea7 APM<\/td>\n<td>AI \u9a71\u52a8\u95ee\u9898\u68c0\u6d4b\u3001\u5168\u6808\u76d1\u63a7<\/td>\n<td>\u8de8\u5e73\u53f0\u4f01\u4e1a\u5e94\u7528<\/td>\n<td>\u667a\u80fd\u5206\u6790\u3001\u81ea\u52a8\u5316\u544a\u8b66<\/td>\n<td>\u6210\u672c\u9ad8\u3001\u914d\u7f6e\u590d\u6742<\/td>\n<\/tr>\n<tr>\n<td><strong>Charles\/Proxyman<\/strong><\/td>\n<td>\u7f51\u7edc\u8c03\u8bd5<\/td>\n<td>HTTP\/HTTPS \u6293\u5305\u3001\u7f51\u7edc\u6027\u80fd\u5206\u6790<\/td>\n<td>\u7f51\u7edc\u95ee\u9898\u8bca\u65ad<\/td>\n<td>\u76f4\u89c2\u3001\u5b9e\u65f6\u6293\u5305<\/td>\n<td>\u4ec5\u8986\u76d6\u7f51\u7edc\u5c42<\/td>\n<\/tr>\n<tr>\n<td><strong>PerformanceSuite<\/strong><\/td>\n<td>\u5f00\u6e90\u76d1\u63a7<\/td>\n<td>TTI\u3001\u51bb\u7ed3\u65f6\u95f4\u3001\u542f\u52a8\u65f6\u95f4\u3001UI \u6e32\u67d3<\/td>\n<td>\u81ea\u7814\u76d1\u63a7\u4f53\u7cfb<\/td>\n<td>\u9ad8\u5ea6\u81ea\u5b9a\u4e49\u3001\u8f7b\u91cf<\/td>\n<td>\u9700\u81ea\u5efa\u540e\u7aef\u548c Dashboard<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"%E4%B8%80%E3%80%81%E5%AE%98%E6%96%B9%E5%B7%A5%E5%85%B7\"><\/span>\u4e00\u3001\u5b98\u65b9\u5de5\u5177<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"11_Xcode_Instruments\"><\/span>1.1 Xcode Instruments<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Xcode Instruments \u662f\u82f9\u679c\u5b98\u65b9\u63d0\u4f9b\u7684\u6027\u80fd\u5206\u6790\u5de5\u5177\u96c6\uff0c\u529f\u80fd\u5168\u9762\u4e14\u6df1\u5165\uff0c\u662f iOS \u6027\u80fd\u5206\u6790\u7684\u9996\u9009\u5de5\u5177\u3002\u5b83\u63d0\u4f9b\u4e86 CPU\u3001\u5185\u5b58\u3001I\/O\u3001\u5361\u987f\u3001\u80fd\u8017\u7b49\u591a\u4e2a\u7ef4\u5ea6\u7684\u5206\u6790\u80fd\u529b\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"111_%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8\"><\/span>1.1.1 \u57fa\u672c\u4f7f\u7528<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h5><span class=\"ez-toc-section\" id=\"%E5%91%BD%E4%BB%A4%E8%A1%8C%E4%BD%BF%E7%94%A8\"><\/span>\u547d\u4ee4\u884c\u4f7f\u7528<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<pre><code class=\"language-bash\"># \u5f00\u59cb\u91c7\u96c6\nxcrun xctrace record --template 'Time Profiler' --attach pid --output 34.trace --device uuid --time-limit 1000ms\n\n# \u5bfc\u51fa XML\nxcrun xctrace export --input 34.trace --xpath '\/trace-toc\/run[@number=&quot;1&quot;]\/data\/table[@schema=&quot;time-profile&quot;]' --output 34.xml\n<\/code><\/pre>\n<h5><span class=\"ez-toc-section\" id=\"GUI_%E4%BD%BF%E7%94%A8\"><\/span>GUI \u4f7f\u7528<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<ol>\n<li>\u5728 Xcode \u4e2d\u9009\u62e9 <strong>Product &gt; Profile<\/strong>\uff08\u6216\u6309 <code>Cmd+I<\/code>\uff09<\/li>\n<li>\u9009\u62e9\u76f8\u5e94\u7684 Instrument \u6a21\u677f<\/li>\n<li>\u70b9\u51fb\u5f55\u5236\u6309\u94ae\u5f00\u59cb\u91c7\u96c6<\/li>\n<li>\u64cd\u4f5c\u5e94\u7528\uff0c\u89c2\u5bdf\u6027\u80fd\u6570\u636e<\/li>\n<li>\u505c\u6b62\u5f55\u5236\uff0c\u5206\u6790\u7ed3\u679c<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"112_CPU_%E5%88%86%E6%9E%90\"><\/span>1.1.2 CPU \u5206\u6790<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h5><span class=\"ez-toc-section\" id=\"System_Trace\"><\/span>System Trace<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u8bb0\u5f55 App \u8fd0\u884c\u8fc7\u7a0b\u4e2d\u7ebf\u7a0b\u548c\u5185\u5b58\u8be6\u7ec6\u8c03\u5ea6\u4fe1\u606f<\/p>\n<p><strong>\u7279\u70b9<\/strong>\uff1a<br \/>\n&#8211; \u4e00\u822c\u53ea\u80fd\u8bb0\u5f55 10S \u7684\u6570\u636e\uff08\u6570\u636e\u91cf\u5927\uff09<br \/>\n&#8211; \u53ef\u4ee5\u67e5\u770b\u7ebf\u7a0b\u8c03\u5ea6\u3001\u7cfb\u7edf\u8c03\u7528\u3001\u5185\u5b58\u5206\u914d\u7b49\u8be6\u7ec6\u4fe1\u606f<br \/>\n&#8211; \u9002\u5408\u5206\u6790\u7cfb\u7edf\u7ea7\u6027\u80fd\u95ee\u9898<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5206\u6790\u7ebf\u7a0b\u8c03\u5ea6\u95ee\u9898<br \/>\n&#8211; \u67e5\u770b\u7cfb\u7edf\u8c03\u7528\u9891\u7387<br \/>\n&#8211; \u8bca\u65ad\u591a\u7ebf\u7a0b\u7ade\u4e89\u95ee\u9898<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Time_Profiler\"><\/span>Time Profiler<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u8bb0\u5f55\u5e94\u7528\u548c\u7ebf\u7a0b\u7684 CPU \u4f7f\u7528\u7387\u548c\u7ebf\u7a0b\u5bf9\u5e94\u7684\u8c03\u7528\u5806\u6808<\/p>\n<p><strong>\u539f\u7406<\/strong>\uff1a<br \/>\n&#8211; \u9ed8\u8ba4 1ms \u91c7\u6837\u4e00\u6b21\uff0c\u53ea\u91c7\u96c6\u5728\u8fd0\u884c\u7ebf\u7a0b\u7684\u8c03\u7528\u6808<br \/>\n&#8211; \u4ee5\u7edf\u8ba1\u5b66\u7684\u65b9\u5f0f\u6c47\u603b\u6570\u636e<br \/>\n&#8211; \u9002\u5408\u7c97\u7c92\u5ea6\u7684\u5206\u6790<\/p>\n<p><strong>\u4f18\u5316\u5efa\u8bae<\/strong>\uff1a\u5982\u679c\u7edf\u8ba1\u51fa\u6765\u7684\u65f6\u95f4\u548c\u5b9e\u9645\u7684\u65f6\u95f4\u76f8\u5dee\u6bd4\u8f83\u591a\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u5f00\u542f\uff1a<br \/>\n&#8211; <strong>High Frequency<\/strong>\uff1a\u964d\u4f4e\u91c7\u6837\u7684\u65f6\u95f4\u95f4\u9694\uff0c\u63d0\u9ad8\u7cbe\u5ea6<br \/>\n&#8211; <strong>Record Kernel Callstacks<\/strong>\uff1a\u8bb0\u5f55\u5185\u6838\u7684\u8c03\u7528\u6808\uff0c\u53ef\u4ee5\u770b\u5230\u7cfb\u7edf\u8c03\u7528<br \/>\n&#8211; <strong>Record Waiting Thread<\/strong>\uff1a\u8bb0\u5f55\u88ab block \u7684\u7ebf\u7a0b\uff0c\u53ef\u4ee5\u770b\u5230\u7b49\u5f85\u65f6\u95f4<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; CPU \u70ed\u70b9\u5206\u6790<br \/>\n&#8211; \u51fd\u6570\u8c03\u7528\u65f6\u95f4\u7edf\u8ba1<br \/>\n&#8211; \u6027\u80fd\u74f6\u9888\u5b9a\u4f4d<\/p>\n<h5><span class=\"ez-toc-section\" id=\"System_Load\"><\/span>System Load<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u76d1\u63a7\u7cfb\u7edf\u8d1f\u8f7d\u548c\u7ebf\u7a0b\u4f18\u5148\u7ea7<\/p>\n<p><strong>\u5173\u952e\u70b9<\/strong>\uff1a\u7ebf\u7a0b\u6709\u4f18\u5148\u7ea7\uff0c\u9ad8\u4f18\u5148\u7ea7\u7684\u7ebf\u7a0b\u4e0d\u5e94\u8be5\u8d85\u8fc7\u7cfb\u7edf\u6838\u5fc3\u6570\u91cf<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5206\u6790\u7ebf\u7a0b\u4f18\u5148\u7ea7\u95ee\u9898<br \/>\n&#8211; \u67e5\u770b\u7cfb\u7edf\u8d1f\u8f7d\u60c5\u51b5<\/p>\n<h5><span class=\"ez-toc-section\" id=\"System_Call_Tree\"><\/span>System Call Tree<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u663e\u793a\u7cfb\u7edf\u8c03\u7528\u6811\uff0c\u53ef\u4ee5\u770b\u5230\u5e94\u7528\u8c03\u7528\u4e86\u54ea\u4e9b\u7cfb\u7edf API<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5206\u6790\u7cfb\u7edf\u8c03\u7528\u9891\u7387<br \/>\n&#8211; \u5b9a\u4f4d\u7cfb\u7edf\u8c03\u7528\u76f8\u5173\u7684\u6027\u80fd\u95ee\u9898<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Thread_State_Trace\"><\/span>Thread State Trace<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u8ffd\u8e2a\u7ebf\u7a0b\u72b6\u6001\u53d8\u5316<\/p>\n<p><strong>\u5173\u952e\u72b6\u6001<\/strong>\uff1a<br \/>\n&#8211; <strong>Running<\/strong>\uff1a\u6b63\u5728\u8fd0\u884c<br \/>\n&#8211; <strong>Waiting<\/strong>\uff1a\u7b49\u5f85\u4e2d<br \/>\n&#8211; <strong>Suspended<\/strong>\uff1a\u6302\u8d77<br \/>\n&#8211; <strong>Preempted<\/strong>\uff1a\u88ab\u62a2\u5360<\/p>\n<p><strong>\u5173\u952e\u70b9<\/strong>\uff1a\u4e3b\u8981\u5173\u6ce8\u6302\u8d77\u548c\u62a2\u5360\u4e24\u4e2a\u72b6\u6001\uff0c\u8bb0\u4f4f\u4e3b\u7ebf\u7a0b\u4e0d\u662f\u4e00\u76f4\u5728\u8fd0\u884c\u7684<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5206\u6790\u7ebf\u7a0b\u8c03\u5ea6\u95ee\u9898<br \/>\n&#8211; \u67e5\u770b\u7ebf\u7a0b\u7b49\u5f85\u65f6\u95f4<br \/>\n&#8211; \u8bca\u65ad\u7ebf\u7a0b\u963b\u585e\u95ee\u9898<\/p>\n<h5><span class=\"ez-toc-section\" id=\"CPU_Counter\"><\/span>CPU Counter<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u76d1\u63a7 CPU \u786c\u4ef6\u8ba1\u6570\u5668\uff0c\u5982\u6307\u4ee4\u6570\u3001\u7f13\u5b58\u547d\u4e2d\u7387\u7b49<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u6df1\u5165\u5206\u6790 CPU \u6027\u80fd<br \/>\n&#8211; \u786c\u4ef6\u7ea7\u6027\u80fd\u4f18\u5316<\/p>\n<h5><span class=\"ez-toc-section\" id=\"CPU_Profiler\"><\/span>CPU Profiler<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1aCPU \u6027\u80fd\u5206\u6790\u5668\uff0c\u63d0\u4f9b\u66f4\u8be6\u7ec6\u7684 CPU \u4f7f\u7528\u60c5\u51b5<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u8be6\u7ec6\u7684 CPU \u6027\u80fd\u5206\u6790<br \/>\n&#8211; \u51fd\u6570\u7ea7\u6027\u80fd\u4f18\u5316<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Activity_Monitor%EF%BC%88%E6%B4%BB%E5%8A%A8%E7%9B%91%E8%A7%86%E5%99%A8%EF%BC%89\"><\/span>Activity Monitor\uff08\u6d3b\u52a8\u76d1\u89c6\u5668\uff09<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u8bb0\u5f55\u7cfb\u7edf\u6240\u6709\u8fdb\u7a0b\u7684\u6d3b\u52a8\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u4efb\u52a1\u7ba1\u7406\u5668<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u67e5\u770b\u7cfb\u7edf\u6574\u4f53\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5<br \/>\n&#8211; \u5bf9\u6bd4\u4e0d\u540c\u5e94\u7528\u7684\u8d44\u6e90\u6d88\u8017<\/p>\n<h5><span class=\"ez-toc-section\" id=\"GCD_Performance\"><\/span>GCD Performance<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u5206\u6790 Grand Central Dispatch\uff08GCD\uff09\u7684\u6027\u80fd<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5206\u6790 GCD \u961f\u5217\u4f7f\u7528\u60c5\u51b5<br \/>\n&#8211; \u4f18\u5316\u5e76\u53d1\u6027\u80fd<\/p>\n<h4><span class=\"ez-toc-section\" id=\"113_%E5%86%85%E5%AD%98%E5%88%86%E6%9E%90\"><\/span>1.1.3 \u5185\u5b58\u5206\u6790<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h5><span class=\"ez-toc-section\" id=\"Leaks\"><\/span>Leaks<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u68c0\u6d4b\u5185\u5b58\u6cc4\u6f0f<\/p>\n<p><strong>\u5185\u5b58\u5206\u7c7b<\/strong>\uff1a<\/p>\n<ul>\n<li><strong>Leaked memory<\/strong>\uff1aMemory unreferenced by your application that cannot be used again or freed (also detectable by using the Leaks instrument).<\/li>\n<li><strong>Abandoned memory<\/strong>\uff1aMemory still referenced by your application that has no useful purpose.<\/li>\n<\/ul>\n<p><strong>\u91cd\u8981\u8bf4\u660e<\/strong>\uff1aInstruments \u53ea\u80fd\u68c0\u6d4b Leaked memory\uff0c\u4e5f\u5c31\u662f\u8bf4\u5faa\u73af\u5f15\u7528\u7684\u5185\u5b58\u65e0\u6cd5\u7528 Leaks \u68c0\u6d4b<\/p>\n<p><img decoding=\"async\" alt=\"descript\" src=\"https:\/\/www.ixriver.com\/wp-content\/uploads\/2026\/02\/image1.png\" \/><\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u68c0\u6d4b\u672a\u91ca\u653e\u7684\u5185\u5b58<br \/>\n&#8211; \u53d1\u73b0\u5185\u5b58\u6cc4\u6f0f\u95ee\u9898<\/p>\n<p><strong>\u5c40\u9650\u6027<\/strong>\uff1a<br \/>\n&#8211; \u65e0\u6cd5\u68c0\u6d4b\u5faa\u73af\u5f15\u7528\u5bfc\u81f4\u7684\u5185\u5b58\u6cc4\u6f0f<br \/>\n&#8211; \u9700\u8981\u4f7f\u7528 Allocations \u914d\u5408\u68c0\u6d4b Abandoned memory<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Allocations\"><\/span>Allocations<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u8ddf\u8e2a\u5185\u5b58\u5206\u914d\u60c5\u51b5\uff0c\u53ef\u4ee5\u7528\u4e8e\u68c0\u6d4b Abandoned memory<\/p>\n<p><strong>\u68c0\u6d4b\u65b9\u6cd5<\/strong>\uff1a\u67e5\u770b <code>#persistent<\/code> \u4e2a\u6570\u662f\u5426\u4e00\u76f4\u5728\u589e\u957f<\/p>\n<p><strong>Mark Generation \u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u901a\u8fc7 mark generation \u622a\u53d6\u5185\u5b58\u5feb\u7167<br \/>\n&#8211; \u901a\u8fc7\u5feb\u7167\u5bf9\u6bd4\u53ef\u4ee5\u5feb\u901f\u7684\u53d1\u73b0\u5185\u5b58\u6cc4\u6f0f<br \/>\n&#8211; \u5bf9\u6bd4\u4e24\u4e2a\u5feb\u7167\u4e4b\u95f4\u7684\u5185\u5b58\u589e\u957f<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u68c0\u6d4b\u5185\u5b58\u589e\u957f\u8d8b\u52bf<br \/>\n&#8211; \u53d1\u73b0\u5185\u5b58\u6cc4\u6f0f\uff08\u5305\u62ec\u5faa\u73af\u5f15\u7528\uff09<br \/>\n&#8211; \u5206\u6790\u5185\u5b58\u5206\u914d\u6a21\u5f0f<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Virtual_Memory_Trace\"><\/span>Virtual Memory Trace<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u8ddf\u8e2a\u6bcf\u4e2a\u6d3b\u8dc3\u7ebf\u7a0b\u7684\u865a\u62df\u5185\u5b58\u4f7f\u7528\u60c5\u51b5<\/p>\n<p><strong>\u5173\u952e\u4e8b\u4ef6<\/strong>\uff1a\u4e3b\u8981\u5173\u6ce8 <strong>Page In<\/strong> \u8fd9\u4e2a\u4e8b\u4ef6\uff0c\u56e0\u4e3a\u542f\u52a8\u8def\u5f84\u4e0a\u6709\u5f88\u591a\u6b21 Page In\uff0c\u4e14\u76f8\u5bf9\u8017\u65f6<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5206\u6790\u542f\u52a8\u6027\u80fd<br \/>\n&#8211; \u67e5\u770b\u5185\u5b58\u5206\u9875\u60c5\u51b5<br \/>\n&#8211; \u4f18\u5316\u5185\u5b58\u8bbf\u95ee\u6a21\u5f0f<\/p>\n<h5><span class=\"ez-toc-section\" id=\"VM_Tracker\"><\/span>VM Tracker<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u6309\u6807\u7b7e\u533a\u57df\u7edf\u8ba1\u8fdb\u7a0b\u7684\u865a\u62df\u5185\u5b58\u4f7f\u7528\u60c5\u51b5<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u67e5\u770b\u5185\u5b58\u5206\u5e03\u60c5\u51b5<br \/>\n&#8211; \u5206\u6790\u5185\u5b58\u5360\u7528\u7ed3\u6784<br \/>\n&#8211; \u4f18\u5316\u5185\u5b58\u4f7f\u7528<\/p>\n<h4><span class=\"ez-toc-section\" id=\"114_IO_%E5%88%86%E6%9E%90\"><\/span>1.1.4 IO \u5206\u6790<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h5><span class=\"ez-toc-section\" id=\"Disk_IO_Latency\"><\/span>Disk I\/O Latency<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u67e5\u770b\u6bcf\u4e2a I\/O \u64cd\u4f5c\u7684\u5b8c\u6210\u65f6\u95f4<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5206\u6790\u78c1\u76d8 I\/O \u6027\u80fd<br \/>\n&#8211; \u5b9a\u4f4d\u6162 I\/O \u64cd\u4f5c<br \/>\n&#8211; \u4f18\u5316\u6587\u4ef6\u8bfb\u5199\u6027\u80fd<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Disk_Usage\"><\/span>Disk Usage<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u8bb0\u5f55\u78c1\u76d8 I\/O \u64cd\u4f5c<\/p>\n<p><img decoding=\"async\" alt=\"descript\" src=\"https:\/\/www.ixriver.com\/wp-content\/uploads\/2026\/02\/image2.png\" \/><\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u67e5\u770b\u78c1\u76d8 I\/O \u9891\u7387<br \/>\n&#8211; \u5206\u6790 I\/O \u6a21\u5f0f<br \/>\n&#8211; \u4f18\u5316\u6587\u4ef6\u64cd\u4f5c<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Filesystem_Suggestions\"><\/span>Filesystem Suggestions<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u67e5\u770b\u5931\u8d25\u7684\u6587\u4ef6\u64cd\u4f5c<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u53d1\u73b0\u6587\u4ef6\u64cd\u4f5c\u9519\u8bef<br \/>\n&#8211; \u8bca\u65ad\u6587\u4ef6\u7cfb\u7edf\u95ee\u9898<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Filesystem_Activity\"><\/span>Filesystem Activity<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u67e5\u770b\u6587\u4ef6\u7684\u6d3b\u52a8\u64cd\u4f5c<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u76d1\u63a7\u6587\u4ef6\u8bbf\u95ee\u60c5\u51b5<br \/>\n&#8211; \u5206\u6790\u6587\u4ef6\u64cd\u4f5c\u6027\u80fd<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Core_Data_%E7%9B%B8%E5%85%B3%E5%B7%A5%E5%85%B7\"><\/span>Core Data \u76f8\u5173\u5de5\u5177<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>Core Data Faults<\/strong>\uff1a\u76d1\u63a7 Core Data \u7684 Fault \u64cd\u4f5c\uff0c\u7528\u4e8e\u5206\u6790 Core Data \u6027\u80fd\u548c\u4f18\u5316\u6570\u636e\u8bbf\u95ee\u6a21\u5f0f\u3002<\/p>\n<p><strong>Core Data Fetches<\/strong>\uff1a\u76d1\u63a7 Core Data \u7684 Fetch \u64cd\u4f5c\uff0c\u7528\u4e8e\u5206\u6790 Core Data \u67e5\u8be2\u6027\u80fd\u548c\u4f18\u5316\u6570\u636e\u67e5\u8be2\u3002<\/p>\n<p><strong>Core Data Saves<\/strong>\uff1a\u76d1\u63a7 Core Data \u7684 Save \u64cd\u4f5c\uff0c\u7528\u4e8e\u5206\u6790 Core Data \u4fdd\u5b58\u6027\u80fd\u548c\u4f18\u5316\u6570\u636e\u6301\u4e45\u5316\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"115_%E5%8D%A1%E9%A1%BF%E5%88%86%E6%9E%90\"><\/span>1.1.5 \u5361\u987f\u5206\u6790<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h5><span class=\"ez-toc-section\" id=\"Hangs\"><\/span>Hangs<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u68c0\u6d4b\u5e94\u7528\u6302\u8d77\uff08Hang\uff09\u4e8b\u4ef6<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u53d1\u73b0\u5e94\u7528\u65e0\u54cd\u5e94\u95ee\u9898<br \/>\n&#8211; \u5206\u6790\u4e3b\u7ebf\u7a0b\u963b\u585e<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Hitches\"><\/span>Hitches<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u68c0\u6d4b\u5e27\u7387\u4e0b\u964d\uff08Hitch\uff09\u4e8b\u4ef6<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5206\u6790 UI \u5361\u987f\u95ee\u9898<br \/>\n&#8211; \u4f18\u5316\u6e32\u67d3\u6027\u80fd<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Core_Animation_Commits%EF%BC%88%E6%A0%B8%E5%BF%83%E5%8A%A8%E7%94%BB%E6%8F%90%E4%BA%A4%EF%BC%89\"><\/span>Core Animation Commits\uff08\u6838\u5fc3\u52a8\u753b\u63d0\u4ea4\uff09<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u67e5\u770b\u52a8\u753b\u63d0\u4ea4\u95f4\u9694<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5206\u6790\u52a8\u753b\u6027\u80fd<br \/>\n&#8211; \u4f18\u5316\u52a8\u753b\u6d41\u7545\u5ea6<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Core_Animation_FPS%EF%BC%88%E6%A0%B8%E5%BF%83%E5%8A%A8%E7%94%BB%E5%B8%A7%E7%8E%87%EF%BC%89\"><\/span>Core Animation FPS\uff08\u6838\u5fc3\u52a8\u753b\u5e27\u7387\uff09<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u67e5\u770b\u89c6\u9891\u5e27\u7684\u6e32\u67d3\u5e27\u7387<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u76d1\u63a7\u5e27\u7387\u7a33\u5b9a\u6027<br \/>\n&#8211; \u5206\u6790\u6e32\u67d3\u6027\u80fd<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Advanced_Graphics_Statistics%EF%BC%88%E9%AB%98%E7%BA%A7%E5%9B%BE%E5%BD%A2%E7%BB%9F%E8%AE%A1%EF%BC%89\"><\/span>Advanced Graphics Statistics\uff08\u9ad8\u7ea7\u56fe\u5f62\u7edf\u8ba1\uff09<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u67e5\u770b\u56fe\u5f62\u9a71\u52a8\u76f8\u5173\u7684\u7edf\u8ba1\uff0c\u5c5e\u4e8e\u4f4e\u5c42\u6b21\u786c\u4ef6\u76f8\u5173\u7684\u7edf\u8ba1\u6570\u636e<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u6df1\u5165\u5206\u6790 GPU \u6027\u80fd<br \/>\n&#8211; \u786c\u4ef6\u7ea7\u56fe\u5f62\u4f18\u5316<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Display%EF%BC%88%E6%98%BE%E7%A4%BA%EF%BC%89\"><\/span>Display\uff08\u663e\u793a\uff09<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u76d1\u63a7\u663e\u793a\u76f8\u5173\u7684\u6027\u80fd\u6307\u6807<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5206\u6790\u663e\u793a\u6027\u80fd<br \/>\n&#8211; \u4f18\u5316\u6e32\u67d3\u6d41\u7a0b<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Runloops\"><\/span>Runloops<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u5206\u6790 Runloop \u7684\u6027\u80fd<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5206\u6790\u4e3b\u7ebf\u7a0b\u6027\u80fd<br \/>\n&#8211; \u4f18\u5316\u4e8b\u4ef6\u5904\u7406<\/p>\n<h4><span class=\"ez-toc-section\" id=\"116_%E8%83%BD%E8%80%97%E5%88%86%E6%9E%90\"><\/span>1.1.6 \u80fd\u8017\u5206\u6790<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h5><span class=\"ez-toc-section\" id=\"Energy_Log\"><\/span>Energy Log<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u529f\u80fd<\/strong>\uff1a\u76d1\u63a7\u5e94\u7528\u7684\u80fd\u8017\u60c5\u51b5<\/p>\n<p><strong>\u5173\u952e\u6307\u6807<\/strong>\uff1a<br \/>\n&#8211; CPU \u4f7f\u7528\u7387<br \/>\n&#8211; \u7f51\u7edc\u6d3b\u52a8<br \/>\n&#8211; \u5b9a\u4f4d\u670d\u52a1\u4f7f\u7528<br \/>\n&#8211; \u5c4f\u5e55\u4eae\u5ea6<br \/>\n&#8211; GPU \u4f7f\u7528<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u4f18\u5316\u7535\u6c60\u7eed\u822a<br \/>\n&#8211; \u5206\u6790\u80fd\u8017\u70ed\u70b9<br \/>\n&#8211; \u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u8d44\u6e90\u6d88\u8017<\/p>\n<h3><span class=\"ez-toc-section\" id=\"12_XCTest_XCTMetric\"><\/span>1.2 XCTest + XCTMetric<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1a\u82f9\u679c\u5b98\u65b9\u6d4b\u8bd5\u6846\u67b6\uff0c\u652f\u6301\u6027\u80fd\u6d4b\u8bd5\u6307\u6807<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u6267\u884c\u65f6\u95f4\u6d4b\u8bd5<br \/>\n&#8211; \u5185\u5b58\u4f7f\u7528\u6d4b\u8bd5<br \/>\n&#8211; CPU \u4f7f\u7528\u6d4b\u8bd5<br \/>\n&#8211; \u53ef\u96c6\u6210 CI\/CD<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u5b98\u65b9\u652f\u6301\uff0c\u7a33\u5b9a\u53ef\u9760<br \/>\n&#8211; \u9002\u5408\u81ea\u52a8\u5316\u6027\u80fd\u56de\u5f52\u68c0\u6d4b<br \/>\n&#8211; \u4e0e Xcode \u96c6\u6210\u826f\u597d<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u81ea\u52a8\u5316\u6027\u80fd\u6d4b\u8bd5<br \/>\n&#8211; CI\/CD \u96c6\u6210<br \/>\n&#8211; \u6027\u80fd\u56de\u5f52\u68c0\u6d4b<\/p>\n<p><strong>\u96c6\u6210\u65b9\u5f0f<\/strong>\uff1a<\/p>\n<pre><code class=\"language-swift\">func testPerformance() {\n    measure {\n        \/\/ \u9700\u8981\u6d4b\u8bd5\u6027\u80fd\u7684\u4ee3\u7801\n    }\n}\n\nfunc testMemoryUsage() {\n    measure(metrics: [XCTMemoryMetric()]) {\n        \/\/ \u9700\u8981\u6d4b\u8bd5\u5185\u5b58\u7684\u4ee3\u7801\n    }\n}\n<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"13_Metal_Performance_HUD\"><\/span>1.3 Metal Performance HUD<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1a\u82f9\u679c\u5b98\u65b9\u56fe\u5f62\u6027\u80fd\u8c03\u8bd5\u5de5\u5177<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u5b9e\u65f6\u663e\u793a\u6e32\u67d3\u5e27\u7387<br \/>\n&#8211; GPU \u5f00\u9500\u76d1\u63a7<br \/>\n&#8211; \u56fe\u5f62\u76f8\u5173\u6307\u6807\u5c55\u793a<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u5b98\u65b9\u5de5\u5177\uff0c\u7a33\u5b9a\u53ef\u9760<br \/>\n&#8211; \u5b9e\u65f6\u76d1\u63a7\uff0c\u65e0\u9700\u989d\u5916\u914d\u7f6e<br \/>\n&#8211; \u9002\u5408\u56fe\u5f62\u5bc6\u96c6\u578b\u5e94\u7528<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u6e38\u620f\u6027\u80fd\u8c03\u8bd5<br \/>\n&#8211; \u56fe\u5f62\u5bc6\u96c6\u578b\u5e94\u7528\u4f18\u5316<br \/>\n&#8211; GPU \u6027\u80fd\u5206\u6790<\/p>\n<p><strong>\u4f7f\u7528\u65b9\u6cd5<\/strong>\uff1a<br \/>\n1. \u5728 Xcode \u4e2d\u8fd0\u884c\u5e94\u7528<br \/>\n2. \u5728\u8bbe\u5907\u4e0a\u542f\u7528 Metal Performance HUD\uff08\u8bbe\u7f6e &gt; \u5f00\u53d1\u8005 &gt; Metal Performance HUD\uff09<br \/>\n3. \u5b9e\u65f6\u67e5\u770b GPU \u6027\u80fd\u6307\u6807<\/p>\n<hr \/>\n<h2><span class=\"ez-toc-section\" id=\"%E4%BA%8C%E3%80%81%E7%AC%AC%E4%B8%89%E6%96%B9%E5%B7%A5%E5%85%B7\"><\/span>\u4e8c\u3001\u7b2c\u4e09\u65b9\u5de5\u5177<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"21_%E8%AE%BE%E5%A4%87%E7%AE%A1%E7%90%86%E5%B7%A5%E5%85%B7\"><\/span>2.1 \u8bbe\u5907\u7ba1\u7406\u5de5\u5177<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"211_%E5%9F%BA%E6%9C%AC%E5%8E%9F%E7%90%86\"><\/span>2.1.1 \u57fa\u672c\u539f\u7406<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h5><span class=\"ez-toc-section\" id=\"%E6%95%B0%E6%8D%AE%E9%87%87%E9%9B%86%E6%96%B9%E5%BC%8F\"><\/span>\u6570\u636e\u91c7\u96c6\u65b9\u5f0f<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u5361\u987f\u5806\u6808\u548c\u7ebf\u7a0b\u5feb\u7167\u91c7\u96c6<\/strong><\/p>\n<ol>\n<li>\u4f7f\u7528 <code>ktrace<\/code> \u91cc\u9762\u7684 <code>kdebug<\/code> \u91c7\u96c6\u5361\u987f\u6570\u636e<\/li>\n<li>\u4f7f\u7528 <code>ktrace<\/code> \u91cc\u9762\u7684 <code>kperform<\/code> \u91c7\u96c6\u7ebf\u7a0b\u5feb\u7167<\/li>\n<\/ol>\n<h5><span class=\"ez-toc-section\" id=\"%E6%95%B0%E6%8D%AE%E8%AE%BF%E9%97%AE%E6%96%B9%E5%BC%8F\"><\/span>\u6570\u636e\u8bbf\u95ee\u65b9\u5f0f<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p>\u4f7f\u7528\u82f9\u679c\u63d0\u4f9b\u7684\u540e\u95e8\u670d\u52a1\uff0c\u7aef\u53e3\u53f7 <code>62078<\/code><\/p>\n<ul>\n<li><code>ktrace<\/code>\uff1a\u5185\u6838\u8ffd\u8e2a\u5de5\u5177<\/li>\n<li><code>dtrace<\/code>\uff1a\u52a8\u6001\u8ffd\u8e2a\u5de5\u5177<\/li>\n<\/ul>\n<p><strong>ktrace \u6570\u636e\u83b7\u53d6\u5de5\u5177<\/strong><\/p>\n<p>\u901a\u8fc7\u82f9\u679c\u7684 <code>62078<\/code> \u7aef\u53e3\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u5de5\u5177\uff1a<br \/>\n&#8211; <code>libimobiledevice<\/code> (mobiledevice)<br \/>\n&#8211; <code>Facebook idb<\/code><br \/>\n&#8211; \u963f\u91cc <code>tidevice<\/code><\/p>\n<h4><span class=\"ez-toc-section\" id=\"212_%E5%B7%A5%E5%85%B7%E4%BB%8B%E7%BB%8D\"><\/span>2.1.2 \u5de5\u5177\u4ecb\u7ecd<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h5><span class=\"ez-toc-section\" id=\"%E9%98%BF%E9%87%8C_tidevice\"><\/span>\u963f\u91cc tidevice<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1a\u963f\u91cc\u5f00\u6e90\u7684\u5de5\u5177\uff0c\u901a\u8fc7\u82f9\u679c 62078 \u7aef\u53e3\u8bbf\u95ee\u8bbe\u5907<\/p>\n<p><strong>\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u652f\u6301 ktrace\u3001dtrace \u7b49\u6570\u636e\u91c7\u96c6<br \/>\n&#8211; \u8bbe\u5907\u7ba1\u7406<br \/>\n&#8211; \u6027\u80fd\u6570\u636e\u91c7\u96c6<\/p>\n<p><strong>\u5b89\u88c5<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\">pip install tidevice\n<\/code><\/pre>\n<p><strong>\u4f7f\u7528\u793a\u4f8b<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\"># \u67e5\u770b\u8bbe\u5907\u5217\u8868\ntidevice list\n\n# \u542f\u52a8\u5e94\u7528\ntidevice launch com.example.app\n\n# \u6027\u80fd\u76d1\u63a7\ntidevice perf\n<\/code><\/pre>\n<h5><span class=\"ez-toc-section\" id=\"Facebook_idb\"><\/span>Facebook idb<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1aFacebook \u5f00\u6e90\u7684 iOS \u8bbe\u5907\u7ba1\u7406\u5de5\u5177<\/p>\n<p><strong>\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u8bbe\u5907\u7ba1\u7406<br \/>\n&#8211; \u6027\u80fd\u6570\u636e\u91c7\u96c6<br \/>\n&#8211; \u5e94\u7528\u8c03\u8bd5<\/p>\n<p><strong>\u5b89\u88c5<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\">brew tap facebook\/fb\nbrew install idb-companion\npip install fb-idb\n<\/code><\/pre>\n<p><strong>\u4f7f\u7528\u793a\u4f8b<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\"># \u67e5\u770b\u8bbe\u5907\nidb list-targets\n\n# \u542f\u52a8\u5e94\u7528\nidb launch com.example.app\n<\/code><\/pre>\n<h5><span class=\"ez-toc-section\" id=\"libimobiledevice\"><\/span>libimobiledevice<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1a\u8de8\u5e73\u53f0 iOS \u8bbe\u5907\u901a\u4fe1\u5e93<\/p>\n<p><strong>\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u8bbe\u5907\u7ba1\u7406<br \/>\n&#8211; \u6570\u636e\u8bbf\u95ee<br \/>\n&#8211; \u6587\u4ef6\u4f20\u8f93<\/p>\n<p><strong>\u5b89\u88c5<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\">brew install libimobiledevice\n<\/code><\/pre>\n<p><strong>\u4f7f\u7528\u793a\u4f8b<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\"># \u67e5\u770b\u8bbe\u5907\nidevice_id -l\n\n# \u83b7\u53d6\u8bbe\u5907\u4fe1\u606f\nideviceinfo\n<\/code><\/pre>\n<h5><span class=\"ez-toc-section\" id=\"ifuse\"><\/span>ifuse<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1aiOS \u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\u5de5\u5177<\/p>\n<p><strong>\u5b89\u88c5\u6b65\u9aa4<\/strong>\uff1a<\/p>\n<ol>\n<li>ifuse \u662f\u4e00\u4e2a\u4f9d\u8d56 libimobiledevice \u5e93\u7684\u5de5\u5177\uff0c\u6240\u4ee5\u5fc5\u987b\u9996\u5148\u5b89\u88c5 libimobiledevice<\/li>\n<li>\u9996\u5148\u53bb https:\/\/osxfuse.github.io\/ \u4e0b\u8f7d fuse for macOS \u7684\u5e93<\/li>\n<li>\u7136\u540e GitHub \u4e0a clone \u4e0b\u8f7d ifuse \u6700\u65b0\u6e90\u7801\u5230\u672c\u5730<\/li>\n<\/ol>\n<pre><code class=\"language-bash\">.\/autogen.sh\n.\/configure\nmake\nmake install\n\n# \u6302\u8f7d\u4f1a\u8bae\u6587\u4ef6\u7cfb\u7edf\nifuse --container com.tencent.meeting.dev meeting_log\n\n# \u4f1a\u8bae\u65e5\u5fd7\u76ee\u5f55\n\/Users\/zhengjunming\/Documents\/mj_git\/meeting_log\/Library\/Application Support\/com.tencent.meeting.dev\/Global\/Logs\n<\/code><\/pre>\n<p><strong>Developer Disk Image \u8def\u5f84<\/strong>\uff1a<\/p>\n<pre><code>\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/DeviceSupport\n<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"22_%E7%BA%BF%E4%B8%8A%E7%9B%91%E6%8E%A7%E5%B7%A5%E5%85%B7%EF%BC%88APM%EF%BC%89\"><\/span>2.2 \u7ebf\u4e0a\u76d1\u63a7\u5de5\u5177\uff08APM\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"221_Firebase_Performance_Monitoring\"><\/span>2.2.1 Firebase Performance Monitoring<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1aGoogle \u63d0\u4f9b\u7684\u751f\u4ea7\u73af\u5883\u6027\u80fd\u76d1\u63a7 SDK<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u81ea\u52a8\u91c7\u96c6\u542f\u52a8\u65f6\u95f4<br \/>\n&#8211; \u7f51\u7edc\u8bf7\u6c42\u5ef6\u8fdf\u76d1\u63a7<br \/>\n&#8211; \u5c4f\u5e55\u6e32\u67d3\u6027\u80fd\u76d1\u63a7<br \/>\n&#8211; \u81ea\u5b9a\u4e49 trace \u548c metric<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u96c6\u6210\u7b80\u5355\uff0c\u5f00\u7bb1\u5373\u7528<br \/>\n&#8211; \u6210\u672c\u4f4e\uff08\u514d\u8d39\u989d\u5ea6\u8f83\u9ad8\uff09<br \/>\n&#8211; Google \u751f\u6001\u6574\u5408\u597d<br \/>\n&#8211; \u5b9e\u65f6\u7528\u6237\u6570\u636e\u5bf9\u6bd4<\/p>\n<p><strong>\u5c40\u9650\u6027<\/strong>\uff1a<br \/>\n&#8211; \u6df1\u5ea6\u8bca\u65ad\u80fd\u529b\u6709\u9650<br \/>\n&#8211; \u91c7\u6837\u9891\u7387\u9700\u8981\u989d\u5916\u914d\u7f6e<br \/>\n&#8211; \u590d\u6742\u95ee\u9898\u5b9a\u4f4d\u4e0d\u591f\u7cbe\u7ec6<\/p>\n<p><strong>\u96c6\u6210\u65b9\u5f0f<\/strong>\uff1a<\/p>\n<pre><code class=\"language-swift\">\/\/ Podfile\npod 'Firebase\/Performance'\n\n\/\/ \u4f7f\u7528\nPerformance.startTrace(&quot;custom_trace&quot;)\n\/\/ ... \u4ee3\u7801\u6267\u884c ...\nPerformance.stopTrace(&quot;custom_trace&quot;)\n<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"222_Sentry_Mobile\"><\/span>2.2.2 Sentry Mobile<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1a\u9519\u8bef\u8ddf\u8e2a\u548c\u6027\u80fd\u76d1\u63a7\u5e73\u53f0<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u5d29\u6e83\u548c\u5f02\u5e38\u6355\u83b7<br \/>\n&#8211; \u6162\u4e8b\u52a1\u76d1\u63a7<br \/>\n&#8211; \u5361\u987f\u68c0\u6d4b<br \/>\n&#8211; \u4ee3\u7801\u7ea7 profiling<br \/>\n&#8211; Session replay<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u9519\u8bef\u548c\u6027\u80fd\u7edf\u4e00\u76d1\u63a7<br \/>\n&#8211; Profiling \u80fd\u529b\u5f3a<br \/>\n&#8211; Dashboard \u53ef\u89c6\u5316\u76f4\u89c2<br \/>\n&#8211; \u652f\u6301\u6309\u7248\u672c\/\u8bbe\u5907\/\u7528\u6237\u5206\u7ec4<\/p>\n<p><strong>\u5c40\u9650\u6027<\/strong>\uff1a<br \/>\n&#8211; \u91c7\u6837\u7387\u9700\u63a7\u5236\uff08\u907f\u514d overhead\uff09<br \/>\n&#8211; SDK \u5927\u5c0f\u9700\u8003\u8651<br \/>\n&#8211; \u67d0\u4e9b\u529f\u80fd\u4ecd\u5728 beta \u9636\u6bb5<\/p>\n<p><strong>\u96c6\u6210\u65b9\u5f0f<\/strong>\uff1a<\/p>\n<pre><code class=\"language-swift\">\/\/ Podfile\npod 'Sentry'\n\n\/\/ \u521d\u59cb\u5316\nSentrySDK.start { options in\n    options.dsn = &quot;your-dsn&quot;\n    options.enableProfiling = true\n}\n<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"223_New_Relic_Mobile\"><\/span>2.2.3 New Relic Mobile<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1a\u4f01\u4e1a\u7ea7 APM \u5de5\u5177<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u5b9e\u65f6\u5d29\u6e83\u76d1\u63a7<br \/>\n&#8211; \u7f51\u7edc\u8c03\u7528\u8ddf\u8e2a<br \/>\n&#8211; \u6027\u80fd\u8d8b\u52bf\u5206\u6790<br \/>\n&#8211; \u5206\u5e03\u5f0f tracing<br \/>\n&#8211; \u9519\u8bef\u5206\u7ec4\u548c triage<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u529f\u80fd\u5168\u9762<br \/>\n&#8211; \u591a\u7ef4\u5ea6\u5206\u6790<br \/>\n&#8211; \u9002\u5408\u5927\u578b\u5e94\u7528<br \/>\n&#8211; \u4e0e\u540e\u7aef APM \u6574\u5408<\/p>\n<p><strong>\u5c40\u9650\u6027<\/strong>\uff1a<br \/>\n&#8211; \u6210\u672c\u9ad8<br \/>\n&#8211; \u96c6\u6210\u590d\u6742<br \/>\n&#8211; SDK \u5927\u5c0f\u548c\u4f9d\u8d56\u9700\u6ce8\u610f<\/p>\n<p><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5927\u578b\u6216\u4e2d\u578b\u4f01\u4e1a\u5e94\u7528<br \/>\n&#8211; \u5bf9\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u8981\u6c42\u9ad8<br \/>\n&#8211; \u5e0c\u671b\u524d\u540e\u7aef\u7edf\u4e00\u76d1\u63a7<\/p>\n<h4><span class=\"ez-toc-section\" id=\"224_%E5%85%B6%E4%BB%96_APM_%E5%B7%A5%E5%85%B7\"><\/span>2.2.4 \u5176\u4ed6 APM \u5de5\u5177<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h5><span class=\"ez-toc-section\" id=\"Dynatrace\"><\/span>Dynatrace<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u7279\u70b9<\/strong>\uff1a<br \/>\n&#8211; AI \u9a71\u52a8\u95ee\u9898\u68c0\u6d4b<br \/>\n&#8211; \u5168\u6808\u76d1\u63a7\uff08\u79fb\u52a8\u7aef + \u540e\u7aef\uff09<br \/>\n&#8211; \u81ea\u52a8\u5316\u544a\u8b66<br \/>\n&#8211; \u9002\u5408\u8de8\u5e73\u53f0\u4f01\u4e1a\u5e94\u7528<\/p>\n<h5><span class=\"ez-toc-section\" id=\"Datadog\"><\/span>Datadog<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u7279\u70b9<\/strong>\uff1a<br \/>\n&#8211; \u4e91\u76d1\u63a7\u5e73\u53f0<br \/>\n&#8211; \u8de8\u5e73\u53f0\u76d1\u63a7<br \/>\n&#8211; APM + \u65e5\u5fd7\u5206\u6790<br \/>\n&#8211; \u9002\u5408\u4e91\u73af\u5883\u548c\u6df7\u5408\u73af\u5883<\/p>\n<h5><span class=\"ez-toc-section\" id=\"AppDynamics\"><\/span>AppDynamics<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<p><strong>\u7279\u70b9<\/strong>\uff1a<br \/>\n&#8211; \u4f01\u4e1a\u7ea7 APM<br \/>\n&#8211; \u7aef\u5230\u7aef\u76d1\u63a7<br \/>\n&#8211; \u7528\u6237\u4f53\u9a8c\u3001\u540e\u7aef\u63a5\u53e3\u3001\u5d29\u6e83\u3001\u4e8b\u52a1\u7b49\u591a\u7ef4\u5ea6\u5206\u6790<\/p>\n<h3><span class=\"ez-toc-section\" id=\"23_%E7%BD%91%E7%BB%9C%E8%B0%83%E8%AF%95%E5%B7%A5%E5%85%B7\"><\/span>2.3 \u7f51\u7edc\u8c03\u8bd5\u5de5\u5177<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"231_Charles_Proxy\"><\/span>2.3.1 Charles Proxy<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1aHTTP\/HTTPS \u6293\u5305\u5de5\u5177<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; HTTP\/HTTPS \u8bf7\u6c42\u6293\u5305<br \/>\n&#8211; \u8bf7\u6c42\u54cd\u5e94\u65f6\u95f4\u5206\u6790<br \/>\n&#8211; Payload \u5927\u5c0f\u5206\u6790<br \/>\n&#8211; \u6a21\u62df\u7f51\u7edc\u5ef6\u8fdf<br \/>\n&#8211; \u6a21\u62df\u79bb\u7ebf\u73af\u5883<br \/>\n&#8211; \u8bf7\u6c42\u91cd\u5199\u548c\u65ad\u70b9\u8c03\u8bd5<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u754c\u9762\u76f4\u89c2<br \/>\n&#8211; \u5b9e\u65f6\u6293\u5305<br \/>\n&#8211; \u529f\u80fd\u5f3a\u5927<br \/>\n&#8211; \u8de8\u5e73\u53f0\u652f\u6301<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u7f51\u7edc\u95ee\u9898\u8bca\u65ad<br \/>\n&#8211; API \u63a5\u53e3\u8c03\u8bd5<br \/>\n&#8211; \u7f51\u7edc\u6027\u80fd\u5206\u6790<br \/>\n&#8211; \u63a5\u53e3 Mock<\/p>\n<p><strong>\u914d\u7f6e HTTPS \u89e3\u5bc6<\/strong>\uff1a<br \/>\n1. \u5b89\u88c5 Charles \u6839\u8bc1\u4e66<br \/>\n2. \u5728 iOS \u8bbe\u5907\u4e0a\u4fe1\u4efb\u8bc1\u4e66<br \/>\n3. \u914d\u7f6e SSL Proxying<\/p>\n<h4><span class=\"ez-toc-section\" id=\"232_Proxyman\"><\/span>2.3.2 Proxyman<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1amacOS \u4e13\u7528\u7684\u7f51\u7edc\u8c03\u8bd5\u5de5\u5177<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; HTTP\/HTTPS \u6293\u5305<br \/>\n&#8211; HTTPS \u89e3\u5bc6<br \/>\n&#8211; \u7f51\u7edc\u6027\u80fd\u5206\u6790<br \/>\n&#8211; \u8bf7\u6c42\u91cd\u5199<br \/>\n&#8211; \u811a\u672c\u652f\u6301<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u754c\u9762\u53cb\u597d<br \/>\n&#8211; macOS \u539f\u751f\u5e94\u7528<br \/>\n&#8211; \u6027\u80fd\u4f18\u79c0<br \/>\n&#8211; \u529f\u80fd\u5168\u9762<\/p>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; macOS \u5f00\u53d1\u73af\u5883\u7f51\u7edc\u8c03\u8bd5<br \/>\n&#8211; iOS \u5e94\u7528\u7f51\u7edc\u95ee\u9898\u8bca\u65ad<br \/>\n&#8211; API \u63a5\u53e3\u6d4b\u8bd5<\/p>\n<h3><span class=\"ez-toc-section\" id=\"24_%E9%9D%99%E6%80%81%E6%89%AB%E6%8F%8F%E5%B7%A5%E5%85%B7\"><\/span>2.4 \u9759\u6001\u626b\u63cf\u5de5\u5177<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"241_oclint\"><\/span>2.4.1 oclint<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1a\u9759\u6001\u4ee3\u7801\u5206\u6790\u5de5\u5177<\/p>\n<p><strong>\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u4ee3\u7801\u8d28\u91cf\u68c0\u6d4b<br \/>\n&#8211; \u6f5c\u5728\u95ee\u9898\u53d1\u73b0<br \/>\n&#8211; \u4ee3\u7801\u89c4\u8303\u68c0\u67e5<br \/>\n&#8211; \u6027\u80fd\u95ee\u9898\u68c0\u6d4b<\/p>\n<p><strong>\u96c6\u6210\u65b9\u5f0f<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\"># \u5b89\u88c5\nbrew install oclint\n\n# \u4f7f\u7528\noclint-json-compilation-database -- -report-type html -o report.html\n<\/code><\/pre>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; CI\/CD \u96c6\u6210<br \/>\n&#8211; \u4ee3\u7801\u8d28\u91cf\u68c0\u67e5<br \/>\n&#8211; \u4ee3\u7801\u5ba1\u67e5\u8f85\u52a9<\/p>\n<h4><span class=\"ez-toc-section\" id=\"242_infer\"><\/span>2.4.2 infer<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1aFacebook \u5f00\u6e90\u7684\u9759\u6001\u5206\u6790\u5de5\u5177<\/p>\n<p><strong>\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u5185\u5b58\u6cc4\u6f0f\u68c0\u6d4b<br \/>\n&#8211; \u7a7a\u6307\u9488\u68c0\u6d4b<br \/>\n&#8211; \u8d44\u6e90\u6cc4\u6f0f\u68c0\u6d4b<br \/>\n&#8211; \u5e76\u53d1\u95ee\u9898\u68c0\u6d4b<\/p>\n<p><strong>\u96c6\u6210\u65b9\u5f0f<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\"># \u5b89\u88c5\nbrew install infer\n\n# \u4f7f\u7528\ninfer run -- xcodebuild -workspace App.xcworkspace -scheme App\n<\/code><\/pre>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5185\u5b58\u95ee\u9898\u68c0\u6d4b<br \/>\n&#8211; \u5e76\u53d1\u95ee\u9898\u53d1\u73b0<br \/>\n&#8211; \u4ee3\u7801\u8d28\u91cf\u63d0\u5347<\/p>\n<h4><span class=\"ez-toc-section\" id=\"243_clang-tidy\"><\/span>2.4.3 clang-tidy<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1aLLVM \u63d0\u4f9b\u7684\u9759\u6001\u5206\u6790\u5de5\u5177<\/p>\n<p><strong>\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; C\/C++\/Objective-C \u4ee3\u7801\u68c0\u67e5<br \/>\n&#8211; \u4ee3\u7801\u89c4\u8303\u68c0\u67e5<br \/>\n&#8211; \u6027\u80fd\u95ee\u9898\u68c0\u6d4b<br \/>\n&#8211; \u73b0\u4ee3\u5316\u4ee3\u7801\u5efa\u8bae<\/p>\n<p><strong>\u96c6\u6210\u65b9\u5f0f<\/strong>\uff1a<\/p>\n<pre><code class=\"language-bash\"># \u4f7f\u7528\nclang-tidy file.m -- -I\/path\/to\/include\n<\/code><\/pre>\n<p><strong>\u4f7f\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; Objective-C\/C++ \u4ee3\u7801\u68c0\u67e5<br \/>\n&#8211; \u4ee3\u7801\u73b0\u4ee3\u5316<br \/>\n&#8211; \u6027\u80fd\u4f18\u5316\u5efa\u8bae<\/p>\n<h3><span class=\"ez-toc-section\" id=\"25_%E5%BC%80%E6%BA%90%E8%87%AA%E7%A0%94%E5%B7%A5%E5%85%B7\"><\/span>2.5 \u5f00\u6e90\/\u81ea\u7814\u5de5\u5177<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"251_Bookingcom_PerformanceSuite\"><\/span>2.5.1 Booking.com PerformanceSuite<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1a\u5f00\u6e90\u6027\u80fd\u76d1\u63a7\u5e93<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; TTI\uff08Time-to-Interactive\uff09\u76d1\u63a7<br \/>\n&#8211; \u51bb\u7ed3\u65f6\u95f4\u68c0\u6d4b<br \/>\n&#8211; \u542f\u52a8\u65f6\u95f4\u76d1\u63a7<br \/>\n&#8211; UI \u6e32\u67d3\u6307\u6807<br \/>\n&#8211; Watchdog \u7ec8\u6b62\u5f02\u5e38\u68c0\u6d4b<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u5f00\u6e90\u514d\u8d39<br \/>\n&#8211; \u9ad8\u5ea6\u81ea\u5b9a\u4e49<br \/>\n&#8211; \u8f7b\u91cf\u7ea7<br \/>\n&#8211; \u9002\u5408\u81ea\u7814\u76d1\u63a7\u4f53\u7cfb<\/p>\n<p><strong>\u5c40\u9650\u6027<\/strong>\uff1a<br \/>\n&#8211; \u9700\u81ea\u5efa\u540e\u7aef\u548c Dashboard<br \/>\n&#8211; \u9700\u8981\u4e00\u5b9a\u7684\u5f00\u53d1\u6210\u672c<\/p>\n<p><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u9700\u8981\u81ea\u5b9a\u4e49\u76d1\u63a7\u6307\u6807<br \/>\n&#8211; \u5e0c\u671b\u63a7\u5236\u6570\u636e\u91c7\u96c6\u548c\u5b58\u50a8<br \/>\n&#8211; \u9884\u7b97\u6709\u9650\u7684\u9879\u76ee<\/p>\n<h4><span class=\"ez-toc-section\" id=\"252_Swift-Metrics\"><\/span>2.5.2 Swift-Metrics<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1aSwift \u6307\u6807 API<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; Counter\u3001Gauge\u3001Timer \u7b49\u6307\u6807\u63a5\u53e3<br \/>\n&#8211; \u4fbf\u4e8e\u96c6\u6210 Prometheus\u3001OpenTelemetry \u7b49\u540e\u7aef<br \/>\n&#8211; \u6807\u51c6\u5316\u6307\u6807\u6536\u96c6<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u6807\u51c6\u5316 API<br \/>\n&#8211; \u6613\u4e8e\u96c6\u6210<br \/>\n&#8211; \u652f\u6301\u591a\u79cd\u540e\u7aef<\/p>\n<p><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u9700\u8981\u6807\u51c6\u5316\u6307\u6807\u6536\u96c6<br \/>\n&#8211; \u96c6\u6210 Prometheus\/OpenTelemetry<br \/>\n&#8211; \u5fae\u670d\u52a1\u67b6\u6784<\/p>\n<h4><span class=\"ez-toc-section\" id=\"253_DBDebugToolkit\"><\/span>2.5.3 DBDebugToolkit<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1aiOS \u8c03\u8bd5\u5de5\u5177\u96c6<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u8fd0\u884c\u65f6\u8c03\u8bd5\u80fd\u529b<br \/>\n&#8211; UI \u8c03\u8bd5\u5de5\u5177<br \/>\n&#8211; \u7f51\u7edc\u8bf7\u6c42\u67e5\u770b<br \/>\n&#8211; \u6570\u636e\u5e93\u67e5\u770b<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u529f\u80fd\u5168\u9762<br \/>\n&#8211; \u6613\u4e8e\u96c6\u6210<br \/>\n&#8211; \u5f00\u53d1\u9636\u6bb5\u5b9e\u7528<\/p>\n<p><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5f00\u53d1\u9636\u6bb5\u8c03\u8bd5<br \/>\n&#8211; \u5feb\u901f\u95ee\u9898\u5b9a\u4f4d<\/p>\n<h4><span class=\"ez-toc-section\" id=\"254_FBRetainCycleDetector\"><\/span>2.5.4 FBRetainCycleDetector<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1aFacebook \u5f00\u6e90\u7684\u5faa\u73af\u5f15\u7528\u68c0\u6d4b\u5de5\u5177<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u68c0\u6d4b\u5faa\u73af\u5f15\u7528<br \/>\n&#8211; \u5185\u5b58\u6cc4\u6f0f\u68c0\u6d4b<br \/>\n&#8211; \u8fd0\u884c\u65f6\u5206\u6790<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u5f00\u6e90\u514d\u8d39<br \/>\n&#8211; \u68c0\u6d4b\u51c6\u786e<br \/>\n&#8211; \u6613\u4e8e\u96c6\u6210<\/p>\n<p><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u5185\u5b58\u6cc4\u6f0f\u68c0\u6d4b<br \/>\n&#8211; \u5faa\u73af\u5f15\u7528\u6392\u67e5<\/p>\n<h4><span class=\"ez-toc-section\" id=\"255_fishhook\"><\/span>2.5.5 fishhook<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u7b80\u4ecb<\/strong>\uff1aFacebook \u5f00\u6e90\u7684\u51fd\u6570 hook \u5de5\u5177<\/p>\n<p><strong>\u4e3b\u8981\u529f\u80fd<\/strong>\uff1a<br \/>\n&#8211; \u51fd\u6570 hook<br \/>\n&#8211; \u8fd0\u884c\u65f6\u62e6\u622a<br \/>\n&#8211; \u6027\u80fd\u76d1\u63a7\u57fa\u7840\u5de5\u5177<\/p>\n<p><strong>\u4f18\u52bf<\/strong>\uff1a<br \/>\n&#8211; \u5f00\u6e90\u514d\u8d39<br \/>\n&#8211; \u529f\u80fd\u5f3a\u5927<br \/>\n&#8211; \u9002\u5408\u9ad8\u7ea7\u7528\u6cd5<\/p>\n<p><strong>\u9002\u7528\u573a\u666f<\/strong>\uff1a<br \/>\n&#8211; \u81ea\u5b9a\u4e49\u6027\u80fd\u76d1\u63a7<br \/>\n&#8211; \u51fd\u6570\u8c03\u7528\u62e6\u622a<br \/>\n&#8211; \u9ad8\u7ea7\u8c03\u8bd5\u9700\u6c42<\/p>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>iOS \u6027\u80fd\u5de5\u5177 \u76ee\u5f55 iOS \u6027\u80fd\u5de5\u5177 \u76ee\u5f55 \u6982\u89c8 \u5de5\u5177\u5206\u7c7b \u5feb\u901f\u7d22\u5f15 \u5de5\u5177\u9009\u62e9\u5efa\u8bae \u4e1a\u754c\u6210\u719f\u5de5\u5177\u5bf9\u6bd4 \u4e00\u3001 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"blocksy_meta":[],"featured_image_urls":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":""},"post_excerpt_stackable":"<p>\u76ee\u5f55 Toggle iOS \u6027\u80fd\u5de5\u5177\u76ee\u5f55\u6982\u89c8\u5de5\u5177\u5206\u7c7b\u5b98\u65b9\u5de5\u5177\u7b2c\u4e09\u65b9\u5de5\u5177\u5feb\u901f\u7d22\u5f15\u5de5\u5177\u9009\u62e9\u5efa\u8bae\u4e1a\u754c\u6210\u719f\u5de5\u5177\u5bf9\u6bd4\u4e00\u3001\u5b98\u65b9\u5de5\u51771.1 Xcode Instruments1.1.1 \u57fa\u672c\u4f7f\u7528\u547d\u4ee4\u884c\u4f7f\u7528GUI \u4f7f&hellip;<\/p>\n","category_list":"<a href=\"https:\/\/www.v.ixriver.com\/?cat=36\" rel=\"category\">\u6027\u80fd\u4f18\u5316<\/a>","author_info":{"name":"admin","url":"https:\/\/www.v.ixriver.com\/?author=1"},"comments_num":"0 comments","_links":{"self":[{"href":"https:\/\/www.v.ixriver.com\/index.php?rest_route=\/wp\/v2\/posts\/905"}],"collection":[{"href":"https:\/\/www.v.ixriver.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.v.ixriver.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.v.ixriver.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.v.ixriver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=905"}],"version-history":[{"count":0,"href":"https:\/\/www.v.ixriver.com\/index.php?rest_route=\/wp\/v2\/posts\/905\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.v.ixriver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.v.ixriver.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.v.ixriver.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}