From e7c3c6f17f4b23f29c4d7055d670a477b246684b Mon Sep 17 00:00:00 2001 From: Prashansa Kulshrestha Date: Fri, 21 Nov 2025 12:12:23 +0530 Subject: [PATCH 1/2] chore: perf compare with default kong.yaml --- .github/workflows/benchmark.yaml | 40 ++++++++++++++++++++------------ go.mod | 2 +- go.sum | 2 ++ 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index 6e47e922d..6f5528ffa 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -24,11 +24,16 @@ jobs: uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4 with: path: current - - name: Checkout main branch - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4 + # - name: Checkout main branch + # uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4 + # with: + # path: main + # ref: main + - name: Checkout base branch + uses: actions/checkout@v4 with: - path: main - ref: main + path: base + ref: ${{ github.base_ref }} - name: Setup Go uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 with: @@ -43,20 +48,25 @@ jobs: run: | make benchmark-save mv benchmark_results.txt ../benchmark_results_current.txt - - name: Run benchmarks on main branch - working-directory: main + - name: Run benchmarks on base branch + working-directory: base run: | - if grep -q "benchmark-save" Makefile; then - make benchmark-save - mv benchmark_results.txt ../benchmark_results_main.txt - else - echo "benchmark-save target not found in main branch, creating placeholder results" - # Create a placeholder benchmark result - echo "no benchmark data available in main branch" > ../benchmark_results_main.txt - fi + make benchmark-save + mv benchmark_results.txt ../benchmark_results_base.txt + # - name: Run benchmarks on main branch + # working-directory: main + # run: | + # if grep -q "benchmark-save" Makefile; then + # make benchmark-save + # mv benchmark_results.txt ../benchmark_results_main.txt + # else + # echo "benchmark-save target not found in main branch, creating placeholder results" + # # Create a placeholder benchmark result + # echo "no benchmark data available in main branch" > ../benchmark_results_main.txt + # fi - name: Compare benchmark results run: | - benchstat -confidence 0.6 benchmark_results_main.txt benchmark_results_current.txt | tee benchmark_comparison.txt + benchstat -confidence 0.6 benchmark_results_base.txt benchmark_results_current.txt | tee benchmark_comparison.txt - name: Comment on PR if: github.event_name == 'pull_request' uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 diff --git a/go.mod b/go.mod index 3c5c8c7e0..354e206f9 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/fatih/color v1.18.0 github.com/google/go-cmp v0.7.0 github.com/kong/go-apiops v0.2.1 - github.com/kong/go-database-reconciler v1.29.2 + github.com/kong/go-database-reconciler v1.29.3-0.20251121061432-6d356e463369 github.com/kong/go-kong v0.69.0 github.com/mitchellh/go-homedir v1.1.0 github.com/spf13/cobra v1.9.1 diff --git a/go.sum b/go.sum index 290a68d3d..d365945e4 100644 --- a/go.sum +++ b/go.sum @@ -246,6 +246,8 @@ github.com/kong/go-apiops v0.2.1 h1:6HtyQyOj+CLA86iRtXA6rpTqemp7VqJJ6gpHyNHdB7o= github.com/kong/go-apiops v0.2.1/go.mod h1:yPwbl3P2eQinVGAEA0d3legaYmzPJ+WtJf9fSeGF4b8= github.com/kong/go-database-reconciler v1.29.2 h1:gx/EnXgpv47lX9lfGi+4CHl5uWxtIHS+rYL8fhO76C8= github.com/kong/go-database-reconciler v1.29.2/go.mod h1:DnqxRK/TH8HugJca1cw2n1NCApaNgpzEZhXUzITU0Ro= +github.com/kong/go-database-reconciler v1.29.3-0.20251121061432-6d356e463369 h1:CE1XNJB+UlGIKgATJmrldC/ENH2oUKjIi5SI5zFxPSY= +github.com/kong/go-database-reconciler v1.29.3-0.20251121061432-6d356e463369/go.mod h1:DnqxRK/TH8HugJca1cw2n1NCApaNgpzEZhXUzITU0Ro= github.com/kong/go-kong v0.69.0 h1:1LHU3y+i23X+RxxXT/bKml5bsxeUfKTfWFa3RK85cSU= github.com/kong/go-kong v0.69.0/go.mod h1:J0vGB3wsZ2i99zly1zTRe3v7rOKpkhQZRwbcTFP76qM= github.com/kong/go-slugify v1.0.0 h1:vCFAyf2sdoSlBtLcrmDWUFn0ohlpKiKvQfXZkO5vSKY= From 23b3613f829183a14babb36b5b261ad5ecd21026 Mon Sep 17 00:00:00 2001 From: Prashansa Kulshrestha Date: Fri, 21 Nov 2025 12:21:41 +0530 Subject: [PATCH 2/2] chore: actions update --- .github/workflows/benchmark.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index 6f5528ffa..f56f7c6a1 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -30,7 +30,7 @@ jobs: # path: main # ref: main - name: Checkout base branch - uses: actions/checkout@v4 + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4 with: path: base ref: ${{ github.base_ref }}