Run Perfverse #32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run Perfverse | |
| permissions: | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| run_1: | |
| description: "Git tag and env vars for runs. Format: \"git_tag:ENV_VAR_1=one;ENV_VAR_2=two\"\n 1st run" | |
| required: true | |
| type: string | |
| run_2: | |
| description: "2nd run" | |
| required: false | |
| type: string | |
| run_3: | |
| description: "3rd run" | |
| required: false | |
| type: string | |
| run_4: | |
| description: "4th run" | |
| required: false | |
| type: string | |
| agent_test_agent_disabled: | |
| description: "Test run with agent disabled?" | |
| default: true | |
| required: true | |
| type: boolean | |
| run_time: | |
| description: "Run time" | |
| default: 5m | |
| required: true | |
| type: string | |
| iterations: | |
| description: "Number of iterations to run" | |
| default: 5 | |
| required: true | |
| type: string | |
| # maybe add a name for each run so its better on graph | |
| jobs: | |
| run_perf_tests_1: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Configure git | |
| run: 'git config --global init.defaultBranch main' | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2 | |
| - name: run 1st version | |
| uses: ./.github/actions/run_perfverse | |
| with: | |
| agent_tag: ${{ inputs.run_1 }} | |
| run_time: ${{ inputs.run_time }} | |
| nr_license_key: ${{ secrets.NEW_RELIC_LICENSE_KEY }} | |
| iterations: ${{ inputs.iterations }} | |
| run_label: run_one | |
| run_perf_tests_2: | |
| runs-on: ubuntu-latest | |
| if: ${{ inputs.run_2 != '' }} | |
| steps: | |
| - name: Configure git | |
| run: 'git config --global init.defaultBranch main' | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2 | |
| - name: run 2nd version | |
| uses: ./.github/actions/run_perfverse | |
| with: | |
| agent_tag: ${{ inputs.run_2 }} | |
| run_time: ${{ inputs.run_time }} | |
| nr_license_key: ${{ secrets.NEW_RELIC_LICENSE_KEY }} | |
| iterations: ${{ inputs.iterations }} | |
| run_label: run_two | |
| run_perf_tests_3: | |
| runs-on: ubuntu-latest | |
| if: ${{ inputs.run_3 != '' }} | |
| steps: | |
| - name: Configure git | |
| run: 'git config --global init.defaultBranch main' | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2 | |
| - name: run 3rd version | |
| uses: ./.github/actions/run_perfverse | |
| with: | |
| agent_tag: ${{ inputs.run_3 }} | |
| run_time: ${{ inputs.run_time }} | |
| nr_license_key: ${{ secrets.NEW_RELIC_LICENSE_KEY }} | |
| iterations: ${{ inputs.iterations }} | |
| run_label: run_three | |
| run_perf_tests_4: | |
| runs-on: ubuntu-latest | |
| if: ${{ inputs.run_4 != '' }} | |
| steps: | |
| - name: Configure git | |
| run: 'git config --global init.defaultBranch main' | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2 | |
| - name: run 4th version | |
| uses: ./.github/actions/run_perfverse | |
| with: | |
| agent_tag: ${{ inputs.run_4 }} | |
| run_time: ${{ inputs.run_time }} | |
| nr_license_key: ${{ secrets.NEW_RELIC_LICENSE_KEY }} | |
| iterations: ${{ inputs.iterations }} | |
| run_label: run_four | |
| run_perf_tests_disabled: | |
| runs-on: ubuntu-latest | |
| if: ${{ inputs.agent_test_agent_disabled }} | |
| steps: | |
| - name: Configure git | |
| run: 'git config --global init.defaultBranch main' | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2 | |
| - name: run agent disabled version | |
| uses: ./.github/actions/run_perfverse | |
| with: | |
| agent_tag: "AGENT_DISABLED:NEW_RELIC_AGENT_ENABLED=false" | |
| run_time: ${{ inputs.run_time }} | |
| nr_license_key: ${{ secrets.NEW_RELIC_LICENSE_KEY }} | |
| iterations: ${{ inputs.iterations }} | |
| run_label: run_agent_disabled | |
| create_graphs: | |
| needs: [run_perf_tests_disabled, run_perf_tests_4, run_perf_tests_3, run_perf_tests_2, run_perf_tests_1] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Configure git | |
| run: 'git config --global init.defaultBranch main' | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2 | |
| - name: create dirs | |
| run: | | |
| mkdir output | |
| mkdir inputs | |
| working-directory: ./test/perfverse/reports | |
| - name: Download all workflow run artifacts | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # tag v7.0.0 | |
| with: | |
| path: test/perfverse/reports/inputs | |
| - name: Build docker image to make graphs | |
| run: | | |
| docker build --pull --progress=plain -t charty:local . | |
| working-directory: ./test/perfverse/reports | |
| - name: Run docker image to make graphs | |
| run: | | |
| docker run --rm --name ruby-charty --mount type=bind,source=./output,target=/charty/output charty:local | |
| working-directory: ./test/perfverse/reports | |
| - name: Upload graphs | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # tag v6.0.0 | |
| with: | |
| if-no-files-found: error | |
| path: test/perfverse/reports/output/ | |
| name: graphs | |
| retention-days: 14 |