/build-benchmark

Measuring software build times

Primary LanguageShell

Benchmarking Java, Rust, Go and Node build times on Windows, WSL and Linux

This repository contains code I used to write an article comparing build times. Read the article here: https://medium.com/aedm/windows-wsl-and-linux-a-build-time-benchmark-for-java-rust-go-and-node-43188a9c77d6

Set up tests on Linux

Start with a fresh Ubuntu.

  1. Run linux/init-install-toolchains.sh. This will install all tools needed.
  2. Open a new Bash.
  3. Run linux/init-clone-repos.sh. This will git clone the test projects into ~/bench.
  4. Run every linux/bench-*.sh script to download dependencies.
  5. Turn off networking.

Set up tests on Windows

  1. Install tools manually. Sorry.
  2. Go to the windows directory.
  3. Run init-clone-repos.ps1. This will git clone the test projects into the current folder.
  4. Run every bench-*.sh script to download dependencies.
  5. Turn off networking.

Running a test

  1. Restart the machine.
  2. Run a bench-* script to run a benchmark with cold file cache.
  3. Run the same script again to get the result with a hot file cache.