OILS / benchmarks / wedge.sh View on Github | oilshell.org

41 lines, 21 significant
1#!/usr/bin/env bash
2#
3# Analyze wedge build on Soil CI.
4#
5# Usage:
6# benchmarks/wedge.sh <function name>
7
8set -o nounset
9set -o pipefail
10set -o errexit
11
12REPO_ROOT=$(cd $(dirname $0)/.. && pwd)
13readonly REPO_ROOT
14
15#source build/dev-shell.sh # R_LIBS_USER
16
17
18# Keeping ggplot2 out of the wedge until this works
19install-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
25readonly DIR=_tmp/wedge
26
27download-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
35plots() {
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"$@"