diff --git a/.github/workflows/bench.yaml b/.github/workflows/bench.yaml index 19ab69e..8cb15d1 100644 --- a/.github/workflows/bench.yaml +++ b/.github/workflows/bench.yaml @@ -32,10 +32,10 @@ jobs: run: | sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev npm install - bash build.sh + ./build.sh - name: Run bench and graph results working-directory: ./bench - run: bash bench.sh + run: ./bench.sh - uses: chrislennon/action-aws-cli@v1.1 - name: Upload to S3 env: diff --git a/bench/bench.sh b/bench/bench.sh old mode 100644 new mode 100755 index 1e7d211..76d59ed --- a/bench/bench.sh +++ b/bench/bench.sh @@ -8,6 +8,9 @@ for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do done node sizes.js -sudo nice -n -20 taskset -c 1 node speeds.js +# We need sudo to use `nice` but want to keep using current `node`, so use explicit path in case sudo decides to ignore PATH. +node_path="$(which node)" +echo "Using Node.js at $node_path" +sudo nice -n -20 taskset -c 1 "$node_path" speeds.js sudo chown -R "$USER:$USER" results node graph.js diff --git a/bench/profile.sh b/bench/profile.sh old mode 100644 new mode 100755