{"id":27896,"date":"2020-01-20T15:34:25","date_gmt":"2020-01-20T20:34:25","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=27896"},"modified":"2020-01-20T15:34:25","modified_gmt":"2020-01-20T20:34:25","slug":"profiling-mac-unit-tests","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2020\/01\/20\/profiling-mac-unit-tests\/","title":{"rendered":"Profiling Mac Unit Tests"},"content":{"rendered":"<p><a href=\"https:\/\/twitter.com\/iljawascoding\/status\/1219281070559985665\">Ilja A. Iwas<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/iljawascoding\/status\/1219281070559985665\">\n<p>Mac Devs: Is it just me, or is the &ldquo;Profile &lsquo;Test XYZ&rsquo;&rdquo; command in Xcode 11.3 broken? Instruments launches the main app, but does not run any tests. &#x1F937;&#x200D;&#x2642;&#xFE0F;<\/p>\n<\/blockquote>\n<p>He&rsquo;s filed bug FB7543911.<\/p>\n<p>There was a brief period of time where <a href=\"https:\/\/stackoverflow.com\/questions\/21031263\/is-it-possible-to-run-xctest-based-tests-under-instruments-in-xcode-5\">running tests under Instruments<\/a> worked for me, and it was glorious. Then the handy &ldquo;Profile [test]&rdquo; command stopped working&mdash;Instruments would launch but not record anything from the test. I reverted to the old method of setting a breakpoint and manually attaching Instruments to the test process while it was paused. Lately, that no longer works for me, either.<\/p>\n<p>Mostly, I use Instruments to track down memory leaks. An alternative tool is the Memory Graph Debugger, which works within Xcode itself and never seems to have trouble attaching\/recording.<\/p>","protected":false},"excerpt":{"rendered":"<p>Ilja A. Iwas: Mac Devs: Is it just me, or is the &ldquo;Profile &lsquo;Test XYZ&rsquo;&rdquo; command in Xcode 11.3 broken? Instruments launches the main app, but does not run any tests. &#x1F937;&#x200D;&#x2642;&#xFE0F; He&rsquo;s filed bug FB7543911. There was a brief period of time where running tests under Instruments worked for me, and it was glorious. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2020-01-20T20:34:28Z","apple_news_api_id":"eea29f28-e2f7-4412-9576-e859f4f3ee97","apple_news_api_modified_at":"2020-01-20T20:34:28Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/A7qKfKOL3RBKVduhZ9PPulw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[131,56,225,30,1666,571,71,268,226],"class_list":["post-27896","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-bug","tag-debugging","tag-instruments","tag-mac","tag-macos-10-15","tag-memory-management","tag-programming","tag-testing","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/27896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=27896"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/27896\/revisions"}],"predecessor-version":[{"id":27897,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/27896\/revisions\/27897"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=27896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=27896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=27896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}