Skip to content
Snippets Groups Projects
Commit 49946a72 authored by Sergey Kaplun's avatar Sergey Kaplun Committed by Sergey Ostanevich
Browse files

ci: send perf statistics to InfluxDB

This patch adds an additional steps in the <perf_micro.yml> workflow to
aggregate and send aggregated data to InfluxDB via curl.

Also, this patch adds the corresponding environment variables to be used
during workflow to preserve the original commit hash and branch name.

NO_DOC=CI
NO_CHANGELOG=CI
NO_TEST=CI
parent 95257919
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,10 @@ jobs: ...@@ -52,6 +52,10 @@ jobs:
timeout-minutes: 60 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: steps:
- name: Prepare checkout - name: Prepare checkout
uses: tarantool/actions/prepare-checkout@master uses: tarantool/actions/prepare-checkout@master
...@@ -72,6 +76,27 @@ jobs: ...@@ -72,6 +76,27 @@ jobs:
revision: ${{ inputs.revision }} revision: ${{ inputs.revision }}
- name: test - name: test
run: make -f .test.mk test-perf run: make -f .test.mk test-perf
- name: Aggregate benchmark results
run: make -f .test.mk test-perf-aggregate
- name: Send statistics to InfluxDB
# 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 - name: Send VK Teams message on failure
if: failure() if: failure()
uses: ./.github/actions/report-job-status uses: ./.github/actions/report-job-status
......
...@@ -80,6 +80,10 @@ test-perf: CMAKE_PARAMS = -DCMAKE_BUILD_TYPE=RelWithDebInfo \ ...@@ -80,6 +80,10 @@ test-perf: CMAKE_PARAMS = -DCMAKE_BUILD_TYPE=RelWithDebInfo \
test-perf: build run-perf-test test-perf: build run-perf-test
.PHONY: test-perf-aggregate
test-perf-aggregate:
cmake --build ${BUILD_DIR} --target test-perf-aggregate
# *_ASAN variables are common part of respective variables for all ASAN builds. # *_ASAN variables are common part of respective variables for all ASAN builds.
CMAKE_PARAMS_ASAN = -DENABLE_WERROR=ON \ CMAKE_PARAMS_ASAN = -DENABLE_WERROR=ON \
-DENABLE_ASAN=ON \ -DENABLE_ASAN=ON \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment