From aea1706daf71cf32acfafaaa1b0291da465ec09c Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 4 Aug 2023 12:31:33 -0400 Subject: [PATCH 01/10] update jmh benchmark ci --- .github/workflows/ci.yml | 49 ++++++++-------------------------------- 1 file changed, 10 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5dd3641ba..a37df37add 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -209,9 +209,8 @@ jobs: id: push_codecov run: 'bash <(curl -s https://codecov.io/bash)' - Jmh_publish: - name: Jmh Publish - if: ${{ github.event.label.name == 'run jmh' && github.event_name == 'pull_request' }} + benchmark: + name: JMH Benchmarks strategy: matrix: os: [ubuntu-latest] @@ -219,43 +218,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - name: Format Output - id: fomat_output + - name: Build and run JMH benchmark run: | - cat parsed_Current.txt parsed_Main.txt | sort -u > c.txt - while IFS= read -r line; do - if grep -q "$line" Current.txt - then - grep "$line" Current.txt | sed 's/^.*: //' >> finalCurrent.txt; - else - echo "" >> finalCurrent.txt; - fi - if grep -q "$line" Main.txt - then - grep "$line" Main.txt | sed 's/^.*: //' >> finalMain.txt; - else - echo "" >> finalMain.txt; - fi - done < c.txt - paste -d '|' c.txt finalCurrent.txt finalMain.txt > FinalOutput.txt - sed -i -e 's/^/|/' FinalOutput.txt - sed -i -e 's/$/|/' FinalOutput.txt - body=$(cat FinalOutput.txt) - body="${body//'%'/'%25'}" - body="${body//$'\n'/'%0A'}" - body="${body//$'\r'/'%0D'}" - echo $body - echo ::set-output name=body::$(echo $body) - - - - uses: peter-evans/commit-comment@v1 + sbt clean compile + sbt 'benchmarks/jmh:run -i 3 -wi 3 -f1 -t1 -rf json -rff output.json .*' + - name: JMH Benchmark Action + uses: kitlangton/jmh-benchmark-action@main with: - sha: ${{github.sha}} - body: | + jmh-output-path: benchmarks/output.json + github-token: ${{ secrets.GITHUB_TOKEN }} + fail-on-regression: true - **🚀 Jmh Benchmark:** - |Name |Current| Main| - |-----|----| ----| - ${{steps.fomat_output.outputs.body}} - From e317214b0288baeebc2853598f744b7b01b96cc8 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 4 Aug 2023 12:36:48 -0400 Subject: [PATCH 02/10] update CI --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a37df37add..36615fb16f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -218,10 +218,21 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: + - name: Checkout current branch (full) + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 8 + cache: sbt - name: Build and run JMH benchmark run: | - sbt clean compile - sbt 'benchmarks/jmh:run -i 3 -wi 3 -f1 -t1 -rf json -rff output.json .*' + sbt ++${{ matrix.scala }} clean compile + sbt ++${{ matrix.scala }} 'benchmarks/jmh:run -i 3 -wi 3 -f1 -t1 -rf json -rff output.json .*' - name: JMH Benchmark Action uses: kitlangton/jmh-benchmark-action@main with: From 958563c756f33aa51f8e4f0ff017cb03f2d4db99 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 4 Aug 2023 12:37:55 -0400 Subject: [PATCH 03/10] fix jmh-output-path --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36615fb16f..8eb8289257 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -236,7 +236,7 @@ jobs: - name: JMH Benchmark Action uses: kitlangton/jmh-benchmark-action@main with: - jmh-output-path: benchmarks/output.json + jmh-output-path: zio-http-benchmarks/output.json github-token: ${{ secrets.GITHUB_TOKEN }} fail-on-regression: true From 19e466ffe0b9a4e2a76233536b1565558ac12973 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 4 Aug 2023 12:40:03 -0400 Subject: [PATCH 04/10] fix project key --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8eb8289257..f42123b863 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -232,7 +232,7 @@ jobs: - name: Build and run JMH benchmark run: | sbt ++${{ matrix.scala }} clean compile - sbt ++${{ matrix.scala }} 'benchmarks/jmh:run -i 3 -wi 3 -f1 -t1 -rf json -rff output.json .*' + sbt ++${{ matrix.scala }} 'zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 -rf json -rff output.json .*' - name: JMH Benchmark Action uses: kitlangton/jmh-benchmark-action@main with: From f0bba89d390d43c09db924cb699a3d6ba58ea899 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 4 Aug 2023 13:17:29 -0400 Subject: [PATCH 05/10] update workflow --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f42123b863..a824bd9261 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -231,8 +231,7 @@ jobs: cache: sbt - name: Build and run JMH benchmark run: | - sbt ++${{ matrix.scala }} clean compile - sbt ++${{ matrix.scala }} 'zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 -rf json -rff output.json .*' + sbt ++${{ matrix.scala }} 'zioHttpBenchmarks/jmh:run -i 1 -wi 0 -f1 -t1 -rf json -rff output.json HttpCombineEval.ok' - name: JMH Benchmark Action uses: kitlangton/jmh-benchmark-action@main with: From 3755cca46c4b38a6b3e5011c85aeee05bce3a224 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 4 Aug 2023 13:29:18 -0400 Subject: [PATCH 06/10] Empty commit From 65b912bb452ec584ad92794598c9079b20d98f1f Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 4 Aug 2023 17:06:49 -0400 Subject: [PATCH 07/10] add pr/content write permissions for benchmark action --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a824bd9261..307579d01c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -211,6 +211,9 @@ jobs: benchmark: name: JMH Benchmarks + permissions: + pull-requests: write + contents: write strategy: matrix: os: [ubuntu-latest] From 05fc6135c3422c44b12307dea1256271d5bffd37 Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 4 Aug 2023 17:13:30 -0400 Subject: [PATCH 08/10] add write permissions --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 307579d01c..f823c5ba37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -212,8 +212,9 @@ jobs: benchmark: name: JMH Benchmarks permissions: - pull-requests: write contents: write + pull-requests: write + issues: write strategy: matrix: os: [ubuntu-latest] From 8d20e2bb7602db9bc9037bab8dc0e4bd0312941b Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 4 Aug 2023 17:18:09 -0400 Subject: [PATCH 09/10] Empty commit From 72c957037e420f3af5e5d3a8bdcbf2f1e3d454ce Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Fri, 4 Aug 2023 17:30:05 -0400 Subject: [PATCH 10/10] Empty commit