Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nightly job to track build metrics #9460

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b36d7ca
add benchadapters for build metrics
assignUser Apr 10, 2024
43b834c
add docstrings
assignUser Apr 10, 2024
a90cab8
add argsparser and upload function
assignUser Apr 10, 2024
7da0a60
add scheduled buildmetrics job
assignUser Apr 11, 2024
d856e2f
fix workflow to run on fork
assignUser Apr 11, 2024
8486635
fix path
assignUser Apr 11, 2024
7993745
install dependencies
assignUser Apr 11, 2024
1453eea
remove python install, it's in the container
assignUser Apr 11, 2024
f947a91
fix path
assignUser Apr 11, 2024
32b5b0f
unpin benchadapt et al.
assignUser Apr 12, 2024
92cd0b9
add build type to source
assignUser Apr 12, 2024
27f2786
make matrix build with release/debug
assignUser Apr 12, 2024
6a36057
make benchmark job run when requirements change
assignUser Apr 12, 2024
dc20c55
fix build step name
assignUser Apr 12, 2024
381752c
explicitly use base_path
assignUser Apr 12, 2024
2d72cbe
save metrics for faster testing -- REVERT before merge
assignUser Apr 12, 2024
4cb14b3
fix pushd path
assignUser Apr 12, 2024
bfd07bb
fix path
assignUser Apr 12, 2024
f03588f
update makeflags
assignUser Apr 12, 2024
a168397
fix hardcoded reponame
assignUser Apr 12, 2024
8b9d1e3
re add envvars
assignUser Apr 12, 2024
aa551b0
trigger ci
assignUser Apr 12, 2024
9c3872e
trigger ci again
assignUser Apr 12, 2024
1ada279
generate some 'committed' data -- REVERT before merge
assignUser Apr 12, 2024
bec7017
Revert "generate some 'committed' data -- REVERT before merge"
assignUser Apr 12, 2024
30561da
revert testing changes
assignUser Apr 12, 2024
0a23c4b
only run on PR if job changed
assignUser Apr 12, 2024
9e66d61
pin bench* packages to current version for stability
assignUser Apr 12, 2024
90997e5
addresse review feedback
assignUser Apr 19, 2024
254d73b
use 16-core and remove substrait
assignUser Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
- 'third_party/**'
- 'pyvelox/**'
- '.github/workflows/benchmark.yml'
- 'scripts/benchmark-requirements.txt'

push:
branches: [main]

Expand Down
121 changes: 121 additions & 0 deletions .github/workflows/build-metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Collect Build Metrics

on:
pull_request:
paths:
- ".github/workflows/build-metrics.yml"

workflow_dispatch:
inputs:
ref:
description: "ref to check"
required: true

schedule:
- cron: "5 4 * * *"
assignUser marked this conversation as resolved.
Show resolved Hide resolved

permissions:
contents: read

jobs:
metrics:
name: Linux ${{ matrix.type }} with adapters
if: ${{ github.repository == 'facebookincubator/velox' }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/facebookincubator/velox-dev:adapters
strategy:
fail-fast: false
matrix:
include:
- runner: "8-core"
assignUser marked this conversation as resolved.
Show resolved Hide resolved
type: "release"
- runner: "16-core"
type: "debug"
defaults:
run:
shell: bash
env:
VELOX_DEPENDENCY_SOURCE: SYSTEM
simdjson_SOURCE: BUNDLED
xsimd_SOURCE: BUNDLED
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}

- name: Fix git permissions
# Usually actions/checkout does this but as we run in a container
# it doesn't work
run: git config --global --add safe.directory /__w/velox/velox

- name: Make ${{ matrix.type }} Build
env:
MAKEFLAGS: 'MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=4'
run: |
EXTRA_CMAKE_FLAGS=(
"-DVELOX_ENABLE_BENCHMARKS=ON"
"-DVELOX_ENABLE_ARROW=ON"
"-DVELOX_ENABLE_PARQUET=ON"
"-DVELOX_ENABLE_HDFS=ON"
"-DVELOX_ENABLE_S3=ON"
"-DVELOX_ENABLE_GCS=ON"
"-DVELOX_ENABLE_ABFS=ON"
"-DVELOX_ENABLE_SUBSTRAIT=ON"
"-DVELOX_ENABLE_REMOTE_FUNCTIONS=ON"
)
make '${{ matrix.type }}'

- name: Log binary sizes
run: |
mkdir -p /tmp/metrics
sizes_file=/tmp/metrics/object_sizes
pushd '_build/${{ matrix.type }}'

find velox -type f -name '*.so' -o -name '*.a' -exec ls -l -BB {} \; |
awk '{print $5, $9; total += $5} END {print total," total_lib_size"}' > $sizes_file
assignUser marked this conversation as resolved.
Show resolved Hide resolved

find velox -type f -name '*.o' -exec ls -l -BB {} \; |
awk '{print $5, $9; total += $5} END {print total," total_obj_size"}' >> $sizes_file

find velox -type f -name 'velox_*' -exec ls -l -BB {} \; |
awk '{print $5, $9; total += $5} END {print total," total_exec_size"}' >> $sizes_file

- name: Copy ninja_log
run: cp _build/${{ matrix.type }}/.ninja_log /tmp/metrics/.ninja_log

- name: "Install dependencies"
run: |
python3 -m pip install setuptools
python3 -m pip install -r scripts/benchmark-requirements.txt

- name: "Upload Metrics"
env:
CONBENCH_URL: "https://velox-conbench.voltrondata.run/"
CONBENCH_MACHINE_INFO_NAME: "GitHub-runner-${{ matrix.runner }}"
CONBENCH_EMAIL: "${{ secrets.CONBENCH_EMAIL }}"
CONBENCH_PASSWORD: "${{ secrets.CONBENCH_PASSWORD }}"
# These don't actually work https://github.com/conbench/conbench/issues/1484
# but have to be there to work regardless??
CONBENCH_PROJECT_REPOSITORY: "${{ github.repository }}"
CONBENCH_PROJECT_COMMIT: "${{ inputs.ref || github.sha }}"
run: |
./scripts/build-metrics.py upload \
--build_type "${{ matrix.type }}" \
--run_id "BM-${{ matrix.type }}-${{ github.run_id }}-${{ github.run_attempt }}" \
--pr_number "${{ github.event.number }}" \
--sha "${{ inputs.ref || github.sha }}" \
"/tmp/metrics"
6 changes: 3 additions & 3 deletions scripts/benchmark-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

benchadapt@git+https://github.com/conbench/conbench.git@44e81d1#subdirectory=benchadapt/python
benchalerts@git+https://github.com/conbench/conbench.git@44e81d1#subdirectory=benchalerts
benchclients@git+https://github.com/conbench/conbench.git@44e81d1#subdirectory=benchclients/python
benchadapt==2024.3.20
benchalerts==2024.1.10.1
benchclients==2024.3.29.1
Loading
Loading