86 lines
3.4 KiB
YAML
86 lines
3.4 KiB
YAML
name: Run performance benchmarks manually
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
performance_benchmarks:
|
|
name: "Performance benchmarks"
|
|
runs-on: [self-hosted, Linux, X64, Diff, Gen7]
|
|
env:
|
|
THREADS: 24
|
|
MEMGRAPH_ENTERPRISE_LICENSE: ${{ secrets.MEMGRAPH_ENTERPRISE_LICENSE }}
|
|
MEMGRAPH_ORGANIZATION_NAME: ${{ secrets.MEMGRAPH_ORGANIZATION_NAME }}
|
|
|
|
steps:
|
|
- name: Set up repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
# Number of commits to fetch. `0` indicates all history for all
|
|
# branches and tags. (default: 1)
|
|
fetch-depth: 0
|
|
|
|
- name: Build release binaries
|
|
run: |
|
|
# Activate toolchain.
|
|
source /opt/toolchain-v4/activate
|
|
|
|
# Initialize dependencies.
|
|
./init
|
|
|
|
# Build only memgraph release binaries.
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=release ..
|
|
make -j$THREADS
|
|
|
|
- name: Get branch name (merge)
|
|
if: github.event_name != 'pull_request'
|
|
shell: bash
|
|
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
|
|
|
|
- name: Get branch name (pull request)
|
|
if: github.event_name == 'pull_request'
|
|
shell: bash
|
|
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
|
|
|
|
- name: Run benchmarks
|
|
run: |
|
|
cd tests/mgbench
|
|
./benchmark.py vendor-native --num-workers-for-benchmark 12 --export-results benchmark_result.json pokec/medium/*/*
|
|
|
|
./benchmark.py vendor-native --num-workers-for-benchmark 1 --export-results benchmark_supernode.json supernode
|
|
|
|
./benchmark.py vendor-native --num-workers-for-benchmark 1 --export-results benchmark_high_write_set_property.json high_write_set_property
|
|
|
|
./benchmark.py vendor-native --num-workers-for-benchmark 12 --export-results benchmark_cartesian.json cartesian
|
|
|
|
- name: Upload benchmark results
|
|
run: |
|
|
cd tools/bench-graph-client
|
|
virtualenv -p python3 ve3
|
|
source ve3/bin/activate
|
|
pip install -r requirements.txt
|
|
./main.py --benchmark-name "mgbench" \
|
|
--benchmark-results "../../tests/mgbench/benchmark_result.json" \
|
|
--github-run-id "${{ github.run_id }}" \
|
|
--github-run-number "${{ github.run_number }}" \
|
|
--head-branch-name "${{ env.BRANCH_NAME }}"
|
|
|
|
./main.py --benchmark-name "supernode" \
|
|
--benchmark-results "../../tests/mgbench/benchmark_supernode.json" \
|
|
--github-run-id "${{ github.run_id }}" \
|
|
--github-run-number "${{ github.run_number }}" \
|
|
--head-branch-name "${{ env.BRANCH_NAME }}"
|
|
|
|
./main.py --benchmark-name "high_write_set_property" \
|
|
--benchmark-results "../../tests/mgbench/benchmark_high_write_set_property.json" \
|
|
--github-run-id "${{ github.run_id }}" \
|
|
--github-run-number "${{ github.run_number }}" \
|
|
--head-branch-name "${{ env.BRANCH_NAME }}"
|
|
|
|
./main.py --benchmark-name "cartesian" \
|
|
--benchmark-results "../../tests/mgbench/cartesian.json" \
|
|
--github-run-id "${{ github.run_id }}" \
|
|
--github-run-number "${{ github.run_number }}" \
|
|
--head-branch-name "${{ env.BRANCH_NAME }}"
|