From 294c0656274998eccf41964895aad8e4a429ec50 Mon Sep 17 00:00:00 2001 From: Hannes Sverrisson Date: Sun, 12 Dec 2021 23:07:59 +0000 Subject: [PATCH 1/3] Use the new Swift Build System and check when it is being used. Return the environment to the previous state for the user. --- benchmark.sh | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/benchmark.sh b/benchmark.sh index 4e9c66a35..f87abf465 100644 --- a/benchmark.sh +++ b/benchmark.sh @@ -5,14 +5,19 @@ clear echo "Preparing environment" -START_TIME=$(date +"%T") - +readonly duration=$(defaults read com.apple.dt.Xcode ShowBuildOperationDuration) defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES +# We should build with the new build system +readonly swift_build_system=$(defaults read com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration) +defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration YES + +START_TIME=$(date +"%T") + if [ -n "$PATH_TO_PROJECT" ]; then - echo "Running XcodeBenchmark..." - echo "Please do not use your Mac while XcodeBenchmark is in progress\n\n" + echo "Please do not use your Mac while XcodeBenchmark is in progress\n\n" + echo "Running XcodeBenchmark...\n\n" xcodebuild -workspace "$PATH_TO_PROJECT" \ -scheme XcodeBenchmark \ @@ -23,6 +28,8 @@ if [ -n "$PATH_TO_PROJECT" ]; then echo "System Version:" "$(sw_vers -productVersion)" xcodebuild -version | grep "Xcode" + echo "Swift Build System:" "$(defaults read com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration)" + echo "Hardware Overview" system_profiler SPHardwareDataType | grep "Model Name:" system_profiler SPHardwareDataType | grep "Model Identifier:" @@ -55,8 +62,14 @@ if [ -n "$PATH_TO_PROJECT" ]; then echo "2️⃣ Share your results at https://github.com/devMEremenko/XcodeBenchmark" rm -rfd "$PATH_TO_DERIVED" + + # Return environment to previous state + defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration "$swift_build_system" + defaults write com.apple.dt.Xcode ShowBuildOperationDuration "$duration" + + echo "" else - echo "XcodeBenchmark.xcworkspace was not found in the current folder" - echo "Are you running in the XcodeBenchmark folder?" + echo "XcodeBenchmark.xcworkspace was not found in the current folder\n" + echo "Are you running in the XcodeBenchmark folder?\n" fi From 02ed376c5711010ba2f206c043855a11b4809057 Mon Sep 17 00:00:00 2001 From: Hannes Sverrisson Date: Sun, 12 Dec 2021 23:17:30 +0000 Subject: [PATCH 2/3] Prevent overclocking or other means of getting unusal results --- pull_request_template.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pull_request_template.md b/pull_request_template.md index 373c0b96b..830ec3c99 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -3,6 +3,7 @@ **If you have any non-Apple hardware components - submit your results to the `Custom Hardware` table.** * [ ] I performed [all steps](https://github.com/devMEremenko/XcodeBenchmark#before-each-test) to correctly run XcodeBenchmark. +* [ ] I am not overclocking or doing something else to increase my build time beyond what normal users would experience. * [ ] I used Xcode 12.5 or above. * [ ] I attached a screenshot with a compilation time and other fields, [example](img/contribution-example.png). * [ ] I confirm that `Time` column is still sorted. From 9128195f4a9bf4780b938e5d54e46a0e2c6c09db Mon Sep 17 00:00:00 2001 From: Hannes Sverrisson Date: Mon, 13 Dec 2021 00:30:25 +0000 Subject: [PATCH 3/3] New Table added --- ReadMe.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ReadMe.md b/ReadMe.md index 74b563e70..659c30577 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -11,6 +11,12 @@ I believe the results will help developers to make the right *cost/performance* PR merging will be performed on a best-effort basis. If a device you are looking for is not on the list below, check out open [issues](https://github.com/devMEremenko/XcodeBenchmark/issues) and [PRs](https://github.com/devMEremenko/XcodeBenchmark/pulls). +## Xcode 13.2 or above, using the Swift Build System + +| Device | CPU | RAM | SSD | HDD | Xcode | macOS | Time(sec) | +|:--------------------:|:-----------------------:|:---:|:---:|:---:|:-----:|:-------:|:---------:| +| MacBook Pro 14" 2021 | M1 Max 10-core | 64 | 2TB | | 13.2 | 12.0.1 | 88 | + ## Xcode 13.0 or above | Device | CPU | RAM | SSD | HDD | Xcode | macOS | Time(sec) |