Skip to content

Commit

Permalink
ci: send perf statistics to InfluxDB
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Buristan authored and sergos committed Jun 18, 2024
1 parent 9525791 commit 49946a7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/perf_micro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ jobs:

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
Expand All @@ -72,6 +76,27 @@ jobs:
revision: ${{ inputs.revision }}
- name: test
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
if: failure()
uses: ./.github/actions/report-job-status
Expand Down
4 changes: 4 additions & 0 deletions .test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ test-perf: CMAKE_PARAMS = -DCMAKE_BUILD_TYPE=RelWithDebInfo \

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.
CMAKE_PARAMS_ASAN = -DENABLE_WERROR=ON \
-DENABLE_ASAN=ON \
Expand Down

0 comments on commit 49946a7

Please sign in to comment.