Skip to content

Commit

Permalink
Index standalone benchmarks results
Browse files Browse the repository at this point in the history
  • Loading branch information
1pkg committed Sep 14, 2024
1 parent cbac449 commit 7a9ee42
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -162,15 +162,15 @@ 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
path: ${{ env.WORKING_DIRECTORY }}/${{ env.PNG_REPORT_FILE }}
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
Expand All @@ -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
Expand Down
8 changes: 8 additions & 0 deletions testing/benchmark/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -127,13 +129,19 @@ 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 '"'))
$(eval GOBENCH_DEFAULT_TAGS = $(GOBENCH_DEFAULT_TAGS),stack_version=$(shell echo var.stack_version | terraform console | tr -d '"'))
$(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:
Expand Down

0 comments on commit 7a9ee42

Please sign in to comment.