Skip to content

iproto: introduce IS_SYNC feature #3

iproto: introduce IS_SYNC feature

iproto: introduce IS_SYNC feature #3

Workflow file for this run

name: perf_micro
on:
push:
branches:
- 'master'
- 'release/**'
tags:
- '**'
pull_request:
workflow_dispatch:
workflow_call:
inputs:
submodule:
description: Name of submodule to bump.
required: true
type: string
revision:
description: Git revision from submodule repository
required: true
type: string
concurrency:
# Update of a developer branch cancels the previously scheduled workflow
# run for this branch. However, the 'master' branch, release branch, and
# tag workflow runs are never canceled.
#
# We use a trick here: define the concurrency group as 'workflow run ID' +
# 'workflow run attempt' because it is a unique combination for any run.
# So it effectively discards grouping.
#
# Important: we cannot use `github.sha` as a unique identifier because
# pushing a tag may cancel a run that works on a branch push event.
group: ${{ (
github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/heads/release/') ||
startsWith(github.ref, 'refs/tags/')) &&
format('{0}-{1}', github.run_id, github.run_attempt) ||
format('{0}-{1}-perf-micro', github.workflow, github.ref) }}
cancel-in-progress: true
jobs:
perf_micro:
# Run on push to the 'master' and release branches of tarantool/tarantool
# or on pull request if the 'notest' label is not set.
if: github.repository_owner == 'tarantool' &&
( github.event_name != 'pull_request' ||
( github.event_name == 'pull_request' &&
!contains(github.event.pull_request.labels.*.name, 'notest') ) )
runs-on: ubuntu-20.04-self-hosted
timeout-minutes: 60
env:
PERF_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
PERF_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
steps:
- name: Prepare checkout
uses: tarantool/actions/prepare-checkout@master
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
repository: tarantool/tarantool
ref: ${{ inputs.submodule && 'master' || github.ref }}
- uses: ./.github/actions/environment
- name: Install deps
uses: ./.github/actions/install-deps-debian
- name: Optional submodule bump
if: ${{ inputs.submodule }}
uses: ./.github/actions/bump-submodule
with:
submodule: ${{ inputs.submodule }}
revision: ${{ inputs.revision }}
- name: setup environment
run: sh ./perf/tools/setup_env.sh
- name: test
run: make -f .test.mk test-perf
env:
# The taskset alone will pin all the process threads
# into a single (random) isolated CPU, see
# https://bugzilla.kernel.org/show_bug.cgi?id=116701.
# The workaround is using realtime scheduler for the
# isolated task using chrt, e. g.:
# sudo taskset 0xef chrt 50.
# But this makes the process use non-standard, real-time
# round-robin scheduling mechanism.
BENCH_CMD: "taskset 0xfe chrt 50"
- name: Aggregate benchmark results
run: make -f .test.mk test-perf-aggregate
- name: Send statistics to InfluxDB
# Run on push to the 'master' and release branches or on
# non-fork pull requests (secrets are unavailable in fork
# pull requests).
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository
# TODO: For now, use the debug bucket for this PoC.
# --silent -o /dev/null: Prevent dumping any reply part
# in the output in case of an error.
# --fail: Exit with the 22 error code is status >= 400.
# --write-out: See the reason for the failure, if any.
# --retry, --retry-delay: To avoid losing the results of
# running after such a long job, try to retry sending the
# results.
run: >
curl --request POST
"${{ secrets.INFLUXDB_URL }}/api/v2/write?org=tarantool&bucket=perf-debug&precision=s"
--write-out "%{http_code}"
--retry 5
--retry-delay 5
--connect-timeout 120
--fail --silent -o /dev/null
--header "Authorization: Token ${{ secrets.INFLUXDB_TOKEN_DEBUG }}"
--data-binary @./perf/output/summary.txt
- name: Send VK Teams message on failure
if: failure()
uses: ./.github/actions/report-job-status
with:
bot-token: ${{ secrets.VKTEAMS_BOT_TOKEN }}
- name: artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: release
retention-days: 21
path: ${{ env.VARDIR }}/artifacts
- name: Upload artifacts to S3
uses: ./.github/actions/s3-upload-artifact
if: ( success() || failure() ) && ( github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/heads/release/') ||
startsWith(github.ref, 'refs/tags/') )
with:
job-name: ${{ github.job }}
access-key-id: ${{ secrets.MULTIVAC_S3_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.MULTIVAC_S3_SECRET_ACCESS_KEY }}
source: ${{ env.VARDIR }}/artifacts