forked from tarantool/tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
157 lines (135 loc) · 5 KB
/
perf_sysbench.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
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