2023-09-12 23:33:05 +08:00
|
|
|
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
|
2023-10-17 06:04:08 +08:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=release ..
|
2023-09-12 23:33:05 +08:00
|
|
|
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
|
|
|
|
|
2023-10-25 01:44:11 +08:00
|
|
|
./benchmark.py vendor-native --num-workers-for-benchmark 12 --export-results benchmark_cartesian.json cartesian
|
|
|
|
|
2023-09-12 23:33:05 +08:00
|
|
|
- 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" \
|
2023-10-28 18:52:14 +08:00
|
|
|
--benchmark-results "../../tests/mgbench/benchmark_result.json" \
|
2023-09-12 23:33:05 +08:00
|
|
|
--github-run-id "${{ github.run_id }}" \
|
|
|
|
--github-run-number "${{ github.run_number }}" \
|
|
|
|
--head-branch-name "${{ env.BRANCH_NAME }}"
|
|
|
|
|
|
|
|
./main.py --benchmark-name "supernode" \
|
2023-10-28 18:52:14 +08:00
|
|
|
--benchmark-results "../../tests/mgbench/benchmark_supernode.json" \
|
2023-09-12 23:33:05 +08:00
|
|
|
--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" \
|
2023-10-28 18:52:14 +08:00
|
|
|
--benchmark-results "../../tests/mgbench/benchmark_high_write_set_property.json" \
|
2023-09-12 23:33:05 +08:00
|
|
|
--github-run-id "${{ github.run_id }}" \
|
|
|
|
--github-run-number "${{ github.run_number }}" \
|
|
|
|
--head-branch-name "${{ env.BRANCH_NAME }}"
|
2023-10-25 01:44:11 +08:00
|
|
|
|
|
|
|
./main.py --benchmark-name "cartesian" \
|
2023-10-28 18:52:14 +08:00
|
|
|
--benchmark-results "../../tests/mgbench/cartesian.json" \
|
2023-10-25 01:44:11 +08:00
|
|
|
--github-run-id "${{ github.run_id }}" \
|
|
|
|
--github-run-number "${{ github.run_number }}" \
|
|
|
|
--head-branch-name "${{ env.BRANCH_NAME }}"
|