Skip to content

Commit

Permalink
override benchmarks worflow for PGO bench test
Browse files Browse the repository at this point in the history
  • Loading branch information
1pkg committed Sep 23, 2024
1 parent 97e5492 commit 942ff24
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ jobs:
GOBENCH_PASSWORD: ${{ secrets.GOBENCH_PASSWORD }}
GOBENCH_USERNAME: ${{ secrets.GOBENCH_USERNAME }}
GOBENCH_HOST: ${{ secrets.GOBENCH_HOST }}
# temporarily override to get faster feedback
BENCHMARK_WARMUP_TIME: 1m
BENCHMARK_COUNT: 2
BENCHMARK_TIME: 1m
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -115,8 +119,8 @@ jobs:
- name: Build APM Server and Moxy
if: ${{ inputs.runStandalone }}
run: |
make moxy
make apm-server
make moxy
- name: Override docker committed version
if: ${{ ! inputs.runOnStable && ! inputs.runStandalone}}
Expand Down Expand Up @@ -145,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 @@ -158,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 @@ -176,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 All @@ -188,19 +192,19 @@ jobs:
# via a PR to update default.pgo.

- name: Copy CPU profile
if: ${{ inputs.runStandalone && github.ref == 'refs/heads/main' }}
if: ${{ inputs.runStandalone }}
run: make cp-cpuprof

- name: Upload CPU profile
if: ${{ inputs.runStandalone && github.ref == 'refs/heads/main' }}
if: ${{ inputs.runStandalone }}
uses: actions/upload-artifact@v4
with:
name: cpu-profile
path: ${{ env.WORKING_DIRECTORY }}/${{ env.BENCHMARK_CPU_OUT }}
if-no-files-found: error

- name: Open PGO PR
if: ${{ inputs.runStandalone && github.ref == 'refs/heads/main' }}
if: ${{ inputs.runStandalone }}
run: |
cd "${{ github.workspace }}"
mv "$PROFILE_PATH" x-pack/apm-server/default.pgo
Expand Down

0 comments on commit 942ff24

Please sign in to comment.