开发者

How do I use XCode performance tools with a static library project?

开发者 https://www.devze.com 2022-12-09 00:06 出处:网络
I have two projects - one with a static library target and a unit test target - one with an application target that is dependent on the static library and it\'s own unit test target

I have two projects - one with a static library target and a unit test target - one with an application target that is dependent on the static library and it's own unit test target

In the static library project, I can only do a 'Build' or 'Build and Analyze'. If I build the unit test target, the tests are run, but there does not seem to be a way to run anything with the performance tools so I can check for leaks, etc.

What is the best way to use the XCode performance tools with the static library project?

  • add a simple executable targ开发者_JS百科et to the static library test target?

    (Not quite sure what that would mean)

  • add a simple Application target that runs unit tests or otherwise exercises the library

  • something else?

Any advice would be appreciated.

Doug


Your second approach is the correct one. You need some kind of application for the performance tools to chew on. Tools like Instruments are run-time analysis tools; a static library by itself cannot be analyzed by such a tool (that's what static analysis is for).

0

精彩评论

暂无评论...
验证码 换一张
取 消