Skip to content

Commit

Permalink
refactor: (GH-apache#85) Changes in benchmark after review-3
Browse files Browse the repository at this point in the history
Signed-off-by: Saurabh Kumar Singh <[email protected]>
  • Loading branch information
singh1203 committed Feb 3, 2025
1 parent 4dc951e commit 1ce9cb0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ name: Benchmarks
on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- ".github/workflows/benchmark.yml"
- "ci/scripts/bench_adapt.py"
Expand All @@ -35,6 +37,10 @@ jobs:
arch: ['amd64']
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get install -y ca-certificates curl
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -45,9 +51,10 @@ jobs:
go-version: ${{ matrix.go }}
cache: true
cache-dependency-path: go.sum
check-latest: false
- name: Run Benchmarks
run: |
ci/scripts/bench.sh --json
if: github.event_name != 'push'
run: bash ci/scripts/bench.sh . --json
- name: Upload results
if: github.event_name == 'push' && github.repository == 'apache/arrow-go' && github.ref_name == 'main'
env:
Expand Down
20 changes: 18 additions & 2 deletions ci/scripts/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,25 @@

set -ex

source_dir=${1}
# Validate input arguments
if [ -z "$1" ]; then
echo "Error: Missing source directory argument"
exit 1
fi

source_dir="$1"

PARQUET_TEST_DATA="${source_dir}/cpp/submodules/parquet-testing/data"

# If parquet_test_data doesn't exist, download it from Apache Arrow GitHub
if [ ! -d "$PARQUET_TEST_DATA" ]; then
echo "parquet_test_data not found. Fetching from Apache Arrow repository..."
mkdir -p "$PARQUET_TEST_DATA"
curl -L https://github.com/apache/parquet-testing/tree/master/data
fi

export PARQUET_TEST_DATA

export PARQUET_TEST_DATA=${1}/cpp/submodules/parquet-testing/data
pushd "${source_dir}"

# lots of benchmarks, they can take a while
Expand Down

0 comments on commit 1ce9cb0

Please sign in to comment.