List swift functions by slowest compile time (minimum 2-digit milliseconds):
$ xcodebuild -workspace MyProject.xcworkspace -scheme "MyProject" clean build OTHER_SWIFT_FLAGS="-Xfrontend -debug-time-function-bodies" | grep '^[0-9][0-9][0-9]*\.[0-9]*ms' | sort -n
If you want to see the compile times in Xcode build report add to build settings "other swift flags":
-Xfrontend -debug-time-function-bodies
Sources
http://stackoverflow.com/questions/31520133/output-compile-durations-for-swift-files http://yurikarabatov.com/en/tags/ios/