Skip to content

Commit

Permalink
ci: only run benchmarks on main and labeled PRs (#6785)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek authored Dec 5, 2024
1 parent c68ea01 commit 76062fc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: Go Benchmarks
on:
push:
branches:
- 'main'
pull_request:
branches:
- '**'
types:
- labeled
workflow_dispatch: {}

permissions:
contents: write
Expand All @@ -12,6 +18,10 @@ jobs:
benchmark:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
name: Run Go benchmarks
if: |
contains(github.event.*.labels.*.name, 'ci/run-benchmarks') ||
github.event_name == 'workflow_dispatch' ||
github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -41,6 +51,7 @@ jobs:
alert-comment-cc-users: '@Kong/k8s-maintainers'
comment-always: false
comment-on-alert: true
max-items-in-chart: 50

# Enable Job Summary for PRs
summary-always: true
Expand Down

1 comment on commit 76062fc

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Go Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 76062fc Previous: c68ea01 Ratio
BenchmarkGetPluginRelations 23730 ns/op 7296 B/op 66 allocs/op 8510 ns/op 7296 B/op 66 allocs/op 2.79
BenchmarkGetPluginRelations - ns/op 23730 ns/op 8510 ns/op 2.79

This comment was automatically generated by workflow using github-action-benchmark.

CC: @Kong/k8s-maintainers

Please sign in to comment.