Skip to content

perf_sysbench

perf_sysbench #274

Workflow file for this run

name: perf_sysbench
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
debug:
description: |
Debug mode (use InfluxDB test bucket, MyTeam chat, and mailing list)
default: false
required: false
type: boolean
schedule:
- cron: '0 1 * * *'
jobs:
perf_sysbench:
if: github.repository == 'tarantool/tarantool'
runs-on: perf-sh3
# Scheduled workflows cannot be run on non-default branches even they reside
# in them [1]. So using matrix here to run against release branches as well.
# [1] https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
strategy:
fail-fast: false
max-parallel: 1
matrix:
branch: [ 'master', '2.10' ]
steps:
- name: Checkout tarantool
uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}
fetch-depth: 0
submodules: recursive
- uses: ./.github/actions/environment
- name: Checkout bench-run
uses: actions/checkout@v2
with:
path: bench-run
repository: tarantool/bench-run
- name: Checkout sysbench
uses: actions/checkout@v2
with:
path: sysbench
repository: tarantool/sysbench
- name: Build tarantool
run: |
cmake . -DCMAKE_BUILD_TYPE=Release
make -j $(nproc)
- name: Add tarantool path to $PATH
run: echo "${PWD}/src:${PWD}/extra/dist" >> ${GITHUB_PATH}
- name: Get tarantool version
id: tarantool-version
run: echo "::set-output name=value::$(tarantool -e 'print(_TARANTOOL)')"
- name: Build and install sysbench
run: |
./autogen.sh
./configure --with-tarantool --without-mysql
make -j $(nproc)
make install
working-directory: ./sysbench
- name: Run sysbench
# Run each test 10 times to get average result.
# Using absolute path is intentional. It is needed for correct work of
# the running scripts under the hood.
run: ${PWD}/bench-run/benchs/sysbench/run.sh 10
- name: Install requirements for metrics publisher
run: python3 -m pip install --user --requirement requirements.txt
working-directory: ./bench-run/publishing
- name: Publish metrics to database
env:
INFLUXDB_ORG: tarantool
INFLUXDB_BUCKET: ${{ github.event.inputs.debug == 'true' &&
'perf-debug' || 'perf' }}
INFLUXDB_URL: ${{ secrets.INFLUXDB_URL }}
INFLUXDB_TOKEN: ${{ github.event.inputs.debug == 'true' &&
secrets.INFLUXDB_TOKEN_DEBUG || secrets.INFLUXDB_TOKEN }}
run: |
./bench-run/publishing/influxdb.py \
--measurement sysbench \
--file Sysbench_result.txt \
--save sysbench_db_record.txt \
--prev
- name: Install requirements for metrics reporter
run: python3 -m pip install --user --requirement requirements.txt
working-directory: ./bench-run/reporting
- name: Generate metrics report
run: |
./bench-run/reporting/table.py \
--input sysbench_db_record.txt \
--output sysbench_result_table.txt
- name: Send metrics report to MyTeam chat
env:
MYTEAM_URL: ${{ secrets.MYTEAM_URL }}
MYTEAM_TOKEN: ${{ secrets.MYTEAM_TOKEN }}
MYTEAM_CHAT_ID: ${{ github.event.inputs.debug == 'true' &&
secrets.MYTEAM_CHAT_ID_DEBUG || secrets.MYTEAM_CHAT_ID }}
run: |
./bench-run/reporting/myteam.py \
--message-file sysbench_result_table.txt \
--format MarkdownV2
- name: Prepare email body
run: |
{ echo '<pre>'; cat sysbench_result_table.txt; echo '<pre/>'; } \
> sysbench_result_table.html
- name: Send metrics report to mailing list
uses: dawidd6/action-send-mail@v3
with:
server_address: ${{ secrets.PERF_EMAIL_SERVER }}
server_port: 25
subject: >
Tarantool Perf Testing. Branch: ${{ matrix.branch }}.
Build: ${{ steps.tarantool-version.outputs.value }}.
Test: sysbench
to: ${{ github.event.inputs.debug == 'true' &&
secrets.PERF_EMAIL_RECIPIENTS_DEBUG ||
secrets.PERF_EMAIL_RECIPIENTS }}
from: ${{ secrets.PERF_EMAIL_SENDER }}
html_body: file://sysbench_result_table.html
ignore_cert: false
- name: call action to send Telegram message on failure
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_CORE_TOKEN }}
TELEGRAM_TO: ${{ secrets.TELEGRAM_CORE_TO }}
uses: ./.github/actions/send-telegram-notify
if: failure()
- name: Collect artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: perf_sysbench_${{ matrix.branch }}
retention-days: 21
path: |
./[Ss]ysbench_*.txt
./tnt_server.txt