Fix incorrect Node.js version used for bench

This commit is contained in:
Wilson Lin 2020-01-26 23:24:33 +13:00
parent ed7453ef8f
commit 7330b2d24e
3 changed files with 6 additions and 3 deletions

View File

@ -32,10 +32,10 @@ jobs:
run: | run: |
sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
npm install npm install
bash build.sh ./build.sh
- name: Run bench and graph results - name: Run bench and graph results
working-directory: ./bench working-directory: ./bench
run: bash bench.sh run: ./bench.sh
- uses: chrislennon/action-aws-cli@v1.1 - uses: chrislennon/action-aws-cli@v1.1
- name: Upload to S3 - name: Upload to S3
env: env:

5
bench/bench.sh Normal file → Executable file
View File

@ -8,6 +8,9 @@ for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
done done
node sizes.js 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 sudo chown -R "$USER:$USER" results
node graph.js node graph.js

0
bench/profile.sh Normal file → Executable file
View File