• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using XCTest performance tests (Debug vs Release builds)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using XCTest performance tests (Debug vs Release builds)


  • Subject: Using XCTest performance tests (Debug vs Release builds)
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 06 Feb 2017 11:21:28 -0800

[Re-sending now that the lists are back up…]

The performance-testing API in XCTest is interesting — -measureBlock: and so forth. However, unit tests should be run on debug builds, while performance has to be measured on an optimized (release) build. So combining the two in one run doesn’t make sense.

How are people working around this? My first thought is to add a second unit-tests target for the perf tests, and set its scheme to use the Release configuration. But I suspect Xcode won’t let me set up two test targets on a single main target (how will it know which one to run when I choose Test?) Alternatively I can duplicate my main target’s scheme and set the copy’s configuration to Release; but then I’ll need to wrap “#if DEBUG…#endif” around all the unit tests and “#if !DEBUG” around the perf tests, which is awkward. Is there a better way?

—Jens
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Using XCTest performance tests (Debug vs Release builds)
      • From: Chris Hanson <email@hidden>
    • Re: Using XCTest performance tests (Debug vs Release builds)
      • From: David Brittain <email@hidden>
  • Prev by Date: Re: Xcode 3.2.6 to the latest Xcode - what might I lose?
  • Next by Date: Re: Using XCTest performance tests (Debug vs Release builds)
  • Previous by thread: libstdc++ deprecation warning
  • Next by thread: Re: Using XCTest performance tests (Debug vs Release builds)
  • Index(es):
    • Date
    • Thread