FrameworkBenchmarks
FrameworkBenchmarks copied to clipboard
Add --force-rm flag
feat: add --force-rm flag to configure removing intermediate docker layers
This commit makes it possible to turn off the removal of intermediate
docker layers when building the tfb containers by adding a --force-rm
flag to the tfb script. This is useful in situations where you want to
inspect the intermediate layers for debugging purposes, or for caching
builds of dependencies as a docker layer to speed up the build process.
Note that the default behavior is to remove the intermediate layers to avoid filling up the disk with unused layers on the citrine server.
Fixes: https://github.com/TechEmpower/FrameworkBenchmarks/issues/9718
hyper: cache dependencies to reduce build time
This change reduces the time it takes to build the hyper Docker image by caching the dependency builds. This is done by building a dummy binary before copying the source code into the image.
The following frameworks were updated, pinging maintainers:
hyper: @polachok, @seanmonstar, @steveklabnik
I don't really know docker and so cannot review this PR.
No problem - you were auto tagged because I previously added you to the maintainers config on the hyper test, and because I included the hyper change to show how / why this makes sense as a change.
If you're interested a bit in how this works, each command run from a docker file creates a saved layer which can be used by future calls to docker to jump straight to that point rather than running that command again when building an image. Those intermediate layers take up space though, and tend to exhaust the benchmarking storage, so the benchmark turned that saving off.
It's useful to turn it on however for speeding up development activities. The trick to doing so in Rust projects is to compile an empty main.rs against all the dependencies listed in your manifest and lock file and then delete binary that you just created. This saves a docker layer that has a cache of all the compiled dependencies, which speeds up future compilation times.