diff --git a/.github/workflows/perf_micro.yml b/.github/workflows/perf_micro.yml index 4cca22785400159a274882e0738884b77fe927de..af649a86ab92e43002f21e4e0e4f510869cdc820 100644 --- a/.github/workflows/perf_micro.yml +++ b/.github/workflows/perf_micro.yml @@ -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 @@ -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 diff --git a/.test.mk b/.test.mk index 60890a14156b40bd28c81586f58ac5ffe4d8c3a7..601666fe9f765839fe0fc2b62f6acd957ab9119c 100644 --- a/.test.mk +++ b/.test.mk @@ -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 \