Android benchmark projects for Bazel and Gradle
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
big_connected
big_variable_tree
connected
connected_rectangle Regenerate all projects with the latest Android studio poet (#5) Dec 26, 2018
full
java_only
java_only_big_connected
linear Regenerate all projects with the latest Android studio poet (#5) Dec 26, 2018
rectangle
simple_tree
star
third_party
variable_tree
.gitignore
BUILD.bazel
README.md
WORKSPACE
benchmark_all.sh
example_config.json
prepare_project.sh Regenerate all projects with the latest Android studio poet (#5) Dec 26, 2018
regenerate_projects.sh
repositories.bzl

README.md

android-projects

A selection of generated Android projects buildable with Gradle and Bazel, inspired by https://github.com/sunyal/gradle-profiler. This project reuses some of the configuration and scripts in https://github.com/sunyal/gradle-profiler as well.

These projects are used for A/B testing build optimizations with the build systems.

Building and benchmarking

For all projects, in each subdirectory:

  • bazel build //androidAppModule0
  • gradle assembleDebug

To benchmark, run the project's benchmark.sh script to trigger builds with Gradle and Bazel. The results are recorded as CSV and HTML in the project's output folder.

Project generation

The projects are generated using various topologies, listed here.

You can generate more by running:

# Generate the project sources
$ java -jar third_party/android-studio-poet-all.jar example_config.json

# Prepare the benchmark scripts and generate the Bazel and Gradle dependency graph PNGs
$ ./prepare_project.sh $name_of_project 

where example_config.json contains your desired project setup.

Remember to refer to the dependency graphs when modifying the file paths in the project's performance.scenarios. Every project has different Java/Android modules for leaf and root nodes.

Benchmarking

Go into the project subdirectory and run ./benchmark.sh. This will trigger Gradle and Bazel to run the scenarios defined in the project's performance.scenarios.

Projects

simple_tree

Gradle graph

Bazel graph

variable_tree

Gradle graph

Bazel graph

big_variable_tree

Gradle graph

Bazel graph

full

Gradle graph

Bazel graph

connected

Gradle graph

Bazel graph

big_connected

Gradle graph

Bazel graph

linear

Gradle graph

Bazel graph

star

Gradle graph

Bazel graph

rectangle

Gradle graph

Bazel graph

connected_rectangle

Gradle graph

Bazel graph