How to enable build timing in Xcode?

后端 未结 5 1791
失恋的感觉
失恋的感觉 2020-12-22 19:24

I\'d like to know how long my project\'s builds take, for example by displaying it in the build pane. Is this option available somewhere in Xcode?

Thanks.

5条回答
  •  借酒劲吻你
    2020-12-22 19:40

    I solved it with Run Scripts in Build Phases

    I have added one Run Script at start point of the build:

    echo $(date +%s) > ../build_start_time

    and one at the end:

    START=$(cat ../build_start_time)
    END=$(date +%s)
    echo $(echo "$END - $START" | bc)
    

    Now i can see the time in Build Log -> All Messages

提交回复
热议问题