Skip to content

Commit

Permalink
Move benchmark job to Linux VM - facebookincubator#2
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroerp committed Oct 12, 2022
1 parent 0c9f625 commit 90e3863
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 36 deletions.
106 changes: 72 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,8 @@ commands:
git submodule sync --recursive
git submodule update --init --recursive
pre-steps:
setup-environment:
steps:
- checkout
- update-submodules
- run:
name: "Setup Environment"
command: |
Expand All @@ -88,6 +86,12 @@ commands:
keys:
- velox-ccache-debug-{{ arch }}-{{ checksum "merge-base-date" }}

pre-steps:
steps:
- checkout
- update-submodules
- setup-environment

post-steps:
steps:
- save_cache:
Expand All @@ -100,6 +104,43 @@ commands:
- store_test_results:
path: '/tmp/test_xml_output/'

run-benchmarks:
steps:
- run:
name: "Run Benchmarks"
command: |
# get to the directory with benchmarks
cd scripts/veloxbench/veloxbench
# setup .conbench file
touch .conbench
echo "url: $CONBENCH_URL" >> .conbench
echo "email: $CONBENCH_EMAIL" >> .conbench
echo "password: $CONBENCH_PASSWORD" >> .conbench
echo "host_name: CircleCI-runner" >> .conbench
# Figure out the run name and run reason
if [[ $CIRCLE_BRANCH == 'main' ]]; then
# Currently, the names of runs to be included in Conbench history must
# start with 'commit:'
# (https://github.com/conbench/conbench/issues/350)
# This way we can keep track of performance over time on the main branch
# separately from pull request branches and manual runs.
run_name="commit: $(git rev-parse HEAD)"
run_reason='commit'
else
run_name="pull request $CIRCLE_PR_NUMBER: $(git rev-parse HEAD)"
run_reason='pull request'
fi
conbench cpp-micro --run-name="$run_name" --run-reason="$run_reason"
- run:
name: "Analyze Benchmark Regressions and Post to Github"
command: |
export GITHUB_APP_PRIVATE_KEY=$(echo $GITHUB_APP_PRIVATE_KEY_ENCODED | base64 -d)
python3 scripts/benchmark-github-status.py --z-score-threshold 50
executors:
build:
docker:
Expand Down Expand Up @@ -236,42 +277,39 @@ jobs:
# upgrade python to 3.8 for this job
yum install -y python38
pip3.8 install conbench
pip3.8 install git+https://github.com/conbench/benchalerts.git@0.2.1
pip3.8 install git+https://github.com/conbench/benchalerts.git@0.2.2
pip3.8 install scripts/veloxbench
- run-benchmarks
- post-steps

linux-benchmarks-basic-dedicated:
machine:
image: ubuntu-2004:current
resource_class: 2xlarge
environment:
CONBENCH_URL: https://velox-conbench.voltrondata.run/
steps:
- checkout
- update-submodules
- run:
name: "Run Benchmarks"
name: "Setup Ubuntu"
command: |
# get to the directory with benchmarks
cd scripts/veloxbench/veloxbench
# setup .conbench file
touch .conbench
echo "url: $CONBENCH_URL" >> .conbench
echo "email: $CONBENCH_EMAIL" >> .conbench
echo "password: $CONBENCH_PASSWORD" >> .conbench
echo "host_name: CircleCI-runner" >> .conbench
# Figure out the run name and run reason
if [[ $CIRCLE_BRANCH == 'main' ]]; then
# Currently, the names of runs to be included in Conbench history must
# start with 'commit:'
# (https://github.com/conbench/conbench/issues/350)
# This way we can keep track of performance over time on the main branch
# separately from pull request branches and manual runs.
run_name="commit: $(git rev-parse HEAD)"
run_reason='commit'
else
run_name="pull request $CIRCLE_PR_NUMBER: $(git rev-parse HEAD)"
run_reason='pull request'
fi
conbench cpp-micro --run-name="$run_name" --run-reason="$run_reason"
sudo ./scripts/setup-ubuntu.sh
- setup-environment
- run:
name: "Analyze Benchmark Regressions and Post to Github"
name: "Build Benchmarks"
command: |
export GITHUB_APP_PRIVATE_KEY=$(echo $GITHUB_APP_PRIVATE_KEY_ENCODED | base64 -d)
python3.8 scripts/benchmark-github-status.py --z-score-threshold 50
make benchmarks-basic-build NUM_THREADS=16 MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=8
ccache -s
- run:
name: "Install Conbench, Benchalerts, and Veloxbench"
command: |
# upgrade python to 3.8 for this job
#yum install -y python38
pip3 install conbench
pip3 install git+https://github.com/conbench/benchalerts.git@0.2.2
pip3 install scripts/veloxbench
- run-benchmarks
- post-steps

# Build with different options
Expand Down
5 changes: 3 additions & 2 deletions scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ sudo --preserve-env apt install -y \
bison \
flex \
tzdata \
wget
wget \
libprotobuf-dev

function run_and_time {
time "$@"
Expand Down Expand Up @@ -84,7 +85,7 @@ function install_protobuf {

function install_velox_deps {
run_and_time install_fmt
run_and_time install_protobuf
#run_and_time install_protobuf
}

(return 2> /dev/null) && return # If script was sourced, don't run commands.
Expand Down

0 comments on commit 90e3863

Please sign in to comment.