Skip to content

Commit

Permalink
[Combined] Added a script to run XcodeBenchmark from Terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
devMEremenko committed Nov 17, 2020
1 parent bb8a66b commit b678e52
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
14 changes: 6 additions & 8 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@ I believe the results will help developers to make the right *cost/performance*
- Download and install [Xcode](https://apps.apple.com/us/app/xcode/id497799835).
- Open Xcode and install `additional tools` (Xcode should suggest it automatically).
- [Download](https://github.com/devMEremenko/XcodeBenchmark/archive/master.zip) and unarchive XcodeBenchmark project.
- Change permissions of `benchmark.sh` to allow running in `Terminal`
- Drag & drop `XcodeBenchmark` folder to `Terminal` app
- Run `chmod 777 benchmark.sh` in Terminal

## Before each test

1. Disconnect a network cable and turn off WiFi.
1. Disconnect the network cable and turn off WiFi.
2. Make sure to disable all software running at startup
- Go to `System Preferences` -> `Users and Groups` -> `User` -> `Login Items`.
- Empty the list.
Expand All @@ -54,9 +51,10 @@ I believe the results will help developers to make the right *cost/performance*

## Running a test

1. Drag & drop `XcodeBenchmark` folder to `Terminal` app.
1. Open the `Terminal` app.
2. Write `cd ` and drag & drop `XcodeBenchmark` folder to the `Terminal` app to form `cd path/to/xcode-benchmark`.
2. Run `sh benchmark.sh` in `Terminal`.
3. When `XcodeBenchmark` is complited you will see [this information](img/contribution-example.png).
3. When `XcodeBenchmark` has completed you will see [this information](img/contribution-example.png).
4. Upload your results, see [Contribution](https://github.com/devMEremenko/XcodeBenchmark#contribution) section.

## FAQ
Expand All @@ -82,8 +80,8 @@ A framework that includes **42** popular CocoaPods libraries and **70+** depende
| SUM: | 6231 | 157270 | 258605 | 790974 |

**Q: What do the results mean?**
1. First of all, the project is **huge**. I think the majority of projects have a smaller size.
2. The results show *relative* performance in Xcode compared to other Macs under similar conditions.
1. First of all, the project is **huge**. Most projects are of a much smaller size.
2. The results show *relative* performance in Xcode, compared to other Macs running under similar conditions.

**Q: Why is CocoaPods not excluded from git-repo?**
- The project is also used by non-programmers. Let's *keep it simple*.
Expand Down
16 changes: 13 additions & 3 deletions benchmark.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
readonly PATH_TO_PROJECT=$(pwd)/XcodeBenchmark.xcworkspace

echo ""
clear

echo "Preparing environment"

START_TIME=$(date +"%T")

defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
rm -rf ~/Library/Developer/Xcode/DerivedData

Expand Down Expand Up @@ -34,15 +37,22 @@ if [ -n "$PATH_TO_PROJECT" ]; then
system_profiler SPHardwareDataType | grep "Hyper-Threading Technology:"

system_profiler SPHardwareDataType | grep "Memory:"
system_profiler SPSerialATADataType | grep "Model:"

echo ""
echo "✅ XcodeBenchmark is completed"
echo "1️⃣ Take a screenshot of this window (Cmd + Shift + 4 + Space), it must include:"
echo "✅ XcodeBenchmark has completed"
echo "1️⃣ Take a screenshot of this window (Cmd + Shift + 4 + Space) and resize to include:"
echo "\t- Build Time (See ** BUILD SUCCEEDED ** [XYZ sec])"
echo "\t- System Version"
echo "\t- Xcode Version"
echo "\t- Hardware Overview"

echo "\t- Started" "$START_TIME"
echo "\t- Ended " "$(date +"%T")"
echo "\t- Date" `date`
echo ""
echo "2️⃣ Share your results at https://github.com/devMEremenko/XcodeBenchmark"

else
echo "XcodeBenchmark.xcworkspace was not found in the current folder"
echo "Are you running in the XcodeBenchmark folder?"
Expand Down
Binary file modified img/contribution-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b678e52

Please sign in to comment.