Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 24 additions & 14 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ jobs:
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
with:
path: current
- name: Checkout main branch
# - name: Checkout main branch
# uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
# with:
# path: main
# ref: main
- name: Checkout base branch
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
with:
path: main
ref: main
path: base
ref: ${{ github.base_ref }}
- name: Setup Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
Loading