Skip to content

Commit b678e52

Browse files
committed
[Combined] Added a script to run XcodeBenchmark from Terminal
1 parent bb8a66b commit b678e52

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

ReadMe.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,10 @@ I believe the results will help developers to make the right *cost/performance*
3737
- Download and install [Xcode](https://apps.apple.com/us/app/xcode/id497799835).
3838
- Open Xcode and install `additional tools` (Xcode should suggest it automatically).
3939
- [Download](https://github.com/devMEremenko/XcodeBenchmark/archive/master.zip) and unarchive XcodeBenchmark project.
40-
- Change permissions of `benchmark.sh` to allow running in `Terminal`
41-
- Drag & drop `XcodeBenchmark` folder to `Terminal` app
42-
- Run `chmod 777 benchmark.sh` in Terminal
4340

4441
## Before each test
4542

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

5552
## Running a test
5653

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

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

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

8886
**Q: Why is CocoaPods not excluded from git-repo?**
8987
- The project is also used by non-programmers. Let's *keep it simple*.

benchmark.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
readonly PATH_TO_PROJECT=$(pwd)/XcodeBenchmark.xcworkspace
22

3-
echo ""
3+
clear
4+
45
echo "Preparing environment"
56

7+
START_TIME=$(date +"%T")
8+
69
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
710
rm -rf ~/Library/Developer/Xcode/DerivedData
811

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

3639
system_profiler SPHardwareDataType | grep "Memory:"
40+
system_profiler SPSerialATADataType | grep "Model:"
3741

3842
echo ""
39-
echo "✅ XcodeBenchmark is completed"
40-
echo "1️⃣ Take a screenshot of this window (Cmd + Shift + 4 + Space), it must include:"
43+
echo "✅ XcodeBenchmark has completed"
44+
echo "1️⃣ Take a screenshot of this window (Cmd + Shift + 4 + Space) and resize to include:"
4145
echo "\t- Build Time (See ** BUILD SUCCEEDED ** [XYZ sec])"
4246
echo "\t- System Version"
4347
echo "\t- Xcode Version"
4448
echo "\t- Hardware Overview"
49+
50+
echo "\t- Started" "$START_TIME"
51+
echo "\t- Ended " "$(date +"%T")"
52+
echo "\t- Date" `date`
53+
echo ""
4554
echo "2️⃣ Share your results at https://github.com/devMEremenko/XcodeBenchmark"
55+
4656
else
4757
echo "XcodeBenchmark.xcworkspace was not found in the current folder"
4858
echo "Are you running in the XcodeBenchmark folder?"

img/contribution-example.png

395 KB
Loading

0 commit comments

Comments
 (0)