简体   繁体   中英

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

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 target 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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM