This python app makes mock Xcode Swift app projects with BUCK. It lets us test different swift module configurations to see how much build speed is affected by different dependency graphs with identical amounts of code. There are two main command line apps:
genproj.py
which generates one app which you have to build manually yourself. Either with BUCK orxcodebuild
.multisuite.py
, which generates all module configs, builds them, records how long they take to build into a CSV and outputs it's results to a directory passed in the command line. Essentially a benchmark test suite. Can take several hours to run depending how many lines of code each app takes.
This app was architected so other languages, graph generators or build systems wouldn't be much work to add. Theoretically you could extend this app to generate java gradle android apps with the same dependency graph types.
This project is stable and being incubated for long-term support.
With a mac computer that can run macOS 10.13+, install all the dependencies below:
- macOS 10.13.X+, untested on older versions.
- Python 2.7.X (pre-installed on macOS 10.13+)
- Xcode command line tools & Xcode
- Install with:
xcode-select --install
/ The mac app store
- Install with:
- BUCK for xcode project generation
- pipenv
- Install with homebrew:
brew install pipenv
- Install with homebrew:
- Optional: cloc (Count Lines Of Code)
- Install with homebrew:
brew install cloc
- Install with homebrew:
Then:
- Download / git clone this project into a folder.
- Run
pipenv install
to install the required python dependencies. - If you want to run unit tests or develop for this app, make sure to run
pipenv install --dev
After installing all required dependencies:
See pipenv run ./genproj.py -h
or pipenv run ./mulisuite.py -h
for general help. Also take a look at the shell scripts in examples/ to see examples on how to use these command line programs.
Here a few quick examples:
pipenv run ./genproj.py --output_directory "$HOME/Desktop/mockapp" \
--buck_module_path "/mockapp" \
--gen_type flat \
--lines_of_code 150000
# You usually want to use `caffeinate` to prevent your computer
# from going to sleep during a multi hour build test suite.
caffeinate -s pipenv run \
./multisuite.py --log_dir "$HOME/Desktop/multisuite_build_results" \
--app_gen_output_dir "$HOME/Desktop/multisuite_build_results/app_gen"
Take a look at docs/CONTRIBUTING.md!
This project is covered by the Apache License, Version 2.0: