| 1 | #!/usr/bin/env bash
|
| 2 | #
|
| 3 | # Analyze wedge build on Soil CI.
|
| 4 | #
|
| 5 | # Usage:
|
| 6 | # benchmarks/wedge.sh <function name>
|
| 7 |
|
| 8 | set -o nounset
|
| 9 | set -o pipefail
|
| 10 | set -o errexit
|
| 11 |
|
| 12 | REPO_ROOT=$(cd $(dirname $0)/.. && pwd)
|
| 13 | readonly REPO_ROOT
|
| 14 |
|
| 15 | #source build/dev-shell.sh # R_LIBS_USER
|
| 16 |
|
| 17 |
|
| 18 | # Keeping ggplot2 out of the wedge until this works
|
| 19 | install-R-packages() {
|
| 20 | mkdir -p ~/R
|
| 21 | INSTALL_DEST=~/R Rscript -e \
|
| 22 | 'install.packages(c("dplyr", "ggplot2", "RUnit"), lib=Sys.getenv("INSTALL_DEST"), repos="https://cloud.r-project.org")'
|
| 23 | }
|
| 24 |
|
| 25 | readonly DIR=_tmp/wedge
|
| 26 |
|
| 27 | download-tsv() {
|
| 28 | mkdir -p $DIR/{github,sourcehut}
|
| 29 | wget --directory-prefix $DIR/github \
|
| 30 | http://travis-ci.oilshell.org/github-jobs/6022/dev-setup-debian.wwz/_build/wedge/logs/tasks.tsv
|
| 31 | wget --directory-prefix $DIR/sourcehut \
|
| 32 | http://travis-ci.oilshell.org/srht-jobs/1138664/dev-setup-debian.wwz/_build/wedge/logs/tasks.tsv
|
| 33 | }
|
| 34 |
|
| 35 | plots() {
|
| 36 | #R_LIBS_USER=~/R benchmarks/wedge.R xargs-report _build/wedge/logs
|
| 37 | R_LIBS_USER=~/R benchmarks/wedge.R xargs-report $DIR/github
|
| 38 | R_LIBS_USER=~/R benchmarks/wedge.R xargs-report $DIR/sourcehut
|
| 39 | }
|
| 40 |
|
| 41 | "$@"
|