From 7a9ee42a8f694c9d824dbd338ee88835268df8a1 Mon Sep 17 00:00:00 2001 From: Kostiantyn Masliuk <1pkg@protonmail.com> Date: Fri, 13 Sep 2024 17:41:41 -0700 Subject: [PATCH] Index standalone benchmarks results --- .github/workflows/benchmarks.yml | 10 +++++----- testing/benchmark/Makefile | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 4676a4d5f28..f3aac9b357d 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -149,11 +149,11 @@ jobs: # Results are only indexed and uploaded if the run happens on the main branch. - name: Index benchmarks result - if: github.ref == 'refs/heads/main' + # if: github.ref == 'refs/heads/main' run: make index-benchmark-results - name: Download PNG - if: github.ref == 'refs/heads/main' + # if: github.ref == 'refs/heads/main' run: >- ${{ github.workspace }}/.ci/scripts/download-png-from-kibana.sh ${{ secrets.KIBANA_BENCH_ENDPOINT }} @@ -162,7 +162,7 @@ jobs: $PNG_REPORT_FILE - name: Upload PNG - if: github.ref == 'refs/heads/main' + # if: github.ref == 'refs/heads/main' uses: actions/upload-artifact@v4 with: name: kibana-png-report @@ -170,7 +170,7 @@ jobs: if-no-files-found: error - name: Upload PNG to AWS S3 - if: github.ref == 'refs/heads/main' + # if: github.ref == 'refs/heads/main' id: s3-upload-png env: AWS_DEFAULT_REGION: us-east-1 @@ -180,7 +180,7 @@ jobs: echo "png_report_url=https://elastic-apm-server-benchmark-reports.s3.amazonaws.com/${DEST_NAME}" >> "$GITHUB_OUTPUT" - name: Upload benchmark result - if: github.ref == 'refs/heads/main' + # if: github.ref == 'refs/heads/main' uses: actions/upload-artifact@v4 with: name: benchmark-result diff --git a/testing/benchmark/Makefile b/testing/benchmark/Makefile index 5f3df05df4e..9f9b7d9e495 100644 --- a/testing/benchmark/Makefile +++ b/testing/benchmark/Makefile @@ -9,6 +9,8 @@ MOXY_GOARCH ?= amd64 APM_SERVER_GOOS ?= linux APM_SERVER_GOARCH ?= amd64 +RUN_STANDALONE ?= false + TFVARS_SOURCE ?= terraform.tfvars.example BENCHMARK_WARMUP_TIME ?= 5m @@ -127,6 +129,11 @@ index-benchmark-results: _default-gobench-vars .PHONY: _default-gobench-vars _default-gobench-vars: +ifeq ($(RUN_STANDALONE),true) + $(eval GOBENCH_DEFAULT_TAGS = $(GOBENCH_DEFAULT_TAGS),apm_server_size=$(shell echo var.standalone_apm_server_instance_size | terraform console | tr -d '"')) + $(eval GOBENCH_DEFAULT_TAGS = $(GOBENCH_DEFAULT_TAGS),moxy_size=$(shell echo var.standalone_moxy_instance_size | terraform console | tr -d '"')) + $(eval GOBENCH_DEFAULT_TAGS = $(GOBENCH_DEFAULT_TAGS),build_sha=$(shell git rev-parse HEAD)) +else # TODO(marclop) Update code below to use a foor loop, rather than copying the lines. $(eval GOBENCH_DEFAULT_TAGS = $(GOBENCH_DEFAULT_TAGS),apm_server_size=$(shell echo var.apm_server_size | terraform console | tr -d '"')) $(eval GOBENCH_DEFAULT_TAGS = $(GOBENCH_DEFAULT_TAGS),elasticsearch_size=$(shell echo var.elasticsearch_size | terraform console | tr -d '"')) @@ -134,6 +141,7 @@ _default-gobench-vars: $(eval GOBENCH_DEFAULT_TAGS = $(GOBENCH_DEFAULT_TAGS),apm_server_zone_count=$(shell echo var.apm_server_zone_count | terraform console | tr -d '"')) $(eval GOBENCH_DEFAULT_TAGS = $(GOBENCH_DEFAULT_TAGS),elasticsearch_zone_count=$(shell echo var.elasticsearch_zone_count | terraform console | tr -d '"')) $(eval GOBENCH_DEFAULT_TAGS = $(GOBENCH_DEFAULT_TAGS),build_sha=$(shell curl -sL -H "Authorization: Bearer $(shell terraform output -raw apm_secret_token )" $(shell terraform output -raw apm_server_url ) | jq -r '.build_sha')) +endif .PHONY: cat-apm-server-logs cat-apm-server-logs: