diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2019-07-01 17:29:09 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2019-07-16 14:16:16 +0200 |
commit | aa28dbbf8876bd749379ba9540d7cc103bd56291 (patch) | |
tree | 68265fee3c0ff53b720134737ce06287e2ac032c /Vagrantfile | |
parent | d2291ecdd514befd18a8b57ff2c7a8ef0cf04ba8 (diff) | |
download | podman-aa28dbbf8876bd749379ba9540d7cc103bd56291.tar.gz podman-aa28dbbf8876bd749379ba9540d7cc103bd56291.tar.bz2 podman-aa28dbbf8876bd749379ba9540d7cc103bd56291.zip |
analyse package sizes
Analyse the size of all go-packages used during the build process via
the newly added `hack/analyses/go-archive-analysis.sh` script. The
script expects the `WORK` environment variable to be set, which points
to a temporary work directory generated by `go build`. To generate such
a work directory, set the `BUILDFLAGS="-work -a"`:
* `-work` for creating the work directory
* `-a` to force rebuilding all packages even when already cached
The workflow may look as follows:
```
$ BUILDFLAGS="-work -a" make podman
[...]
WORK=/tmp/go-build127001249
$ WORK=/tmp/go-build127001249 ./hack/analyses/go-archive-analysis.sh
```
The output of the script has the format `$SIZE $PACKAGE` where $SIZE is
the size of the compiled version of the go package (i.e., `.a` file) and
$PACKAGE for the corresponding package, for instance, `math/big` for a
stdlib package or vendor/... for vendored packages.
Credits to the authors of https://github.com/jondot/goweight, which
inspired this work.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'Vagrantfile')
0 files changed, 0 insertions, 0 deletions