Skip to content

Commit

Permalink
Only one benchmark workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
felldo committed Nov 19, 2023
1 parent 8463f90 commit 7b2deee
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# https://docs.github.com/en/rest/overview/github-event-types
name: Benchmark
on:
push:
branches:
- master
pull_request:
branches:
- master
Expand All @@ -14,7 +17,7 @@ permissions:

jobs:
benchmark:
name: Performance regression check PR
name: Performance regression check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -26,7 +29,26 @@ jobs:
- name: Run benchmark
run: ./gradlew jmh
# Run `github-action-benchmark` action
- name: Store benchmark result
# - name: Compare benchmark results
# uses: benchmark-action/github-action-benchmark@v1
# with:
# # What benchmark tool the output.txt came from
# tool: 'jmh'
# # Where the output from the benchmark tool is stored
# output-file-path: ./lib/build/results/jmh/results.json
# # Workflow will fail when an alert happens
# fail-on-alert: false
# alert-threshold: 1%
# # GitHub API token to make a commit comment
# github-token: ${{ secrets.GITHUB_TOKEN }}
# # Enable alert commit comment
# comment-on-alert: true
# # Enable Job Summary for PRs
# summary-always: true
# # Mention @felldo in the commit comment
# alert-comment-cc-users: '@felldo'
# save-data-file: false
- name: Compare and publish benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
# What benchmark tool the output.txt came from
Expand All @@ -44,4 +66,4 @@ jobs:
summary-always: true
# Mention @felldo in the commit comment
alert-comment-cc-users: '@felldo'
save-data-file: false
auto-push: true

2 comments on commit 7b2deee

@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.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 0.01.

Benchmark suite Current: 7b2deee Previous: f6fbe27 Ratio
benchmark.EmojiManagerAliasBenchmark.getByAlias ( {"alias":":+1:"} ) 138.5812033530968 ns/op 131.7094056550113 ns/op 1.05
benchmark.EmojiManagerAliasBenchmark.getByAlias ( {"alias":"nope"} ) 149.1578020962805 ns/op 146.20002802404107 ns/op 1.02
benchmark.EmojiManagerBenchmark.containsEmoji 3.063002899082569 ms/op 3.045273609442828 ms/op 1.01
benchmark.EmojiManagerBenchmark.extractEmojisInOrder 3.294378019736842 ms/op 3.2562022906119035 ms/op 1.01
benchmark.EmojiManagerBenchmark.extractEmojisInOrderOnlyEmojisLengthDescending 22.594209844444446 ms/op 22.664659066286415 ms/op 1.00
benchmark.EmojiManagerBenchmark.extractEmojisInOrderOnlyEmojisRandomOrder 24.361461595238094 ms/op 23.969543983812923 ms/op 1.02
benchmark.EmojiManagerBenchmark.removeAllEmojis 4.9268132068965516 ms/op 4.701839011834302 ms/op 1.05
benchmark.EmojiManagerBenchmark.replaceAllEmojis 4.823869076923077 ms/op 5.439070801554223 ms/op 0.89
benchmark.EmojiManagerBenchmark.replaceAllEmojisFunction 5.02671788442211 ms/op 5.52193127506891 ms/op 0.91

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

CC: @felldo

@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.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 0.01.

Benchmark suite Current: 7b2deee Previous: f6fbe27 Ratio
benchmark.EmojiManagerAliasBenchmark.getByAlias ( {"alias":":+1:"} ) 131.88321356921682 ns/op 131.7094056550113 ns/op 1.00
benchmark.EmojiManagerAliasBenchmark.getByAlias ( {"alias":"nope"} ) 147.7518161750098 ns/op 146.20002802404107 ns/op 1.01
benchmark.EmojiManagerBenchmark.containsEmoji 3.0997753653250775 ms/op 3.045273609442828 ms/op 1.02
benchmark.EmojiManagerBenchmark.extractEmojisInOrder 3.272245996732026 ms/op 3.2562022906119035 ms/op 1.00
benchmark.EmojiManagerBenchmark.extractEmojisInOrderOnlyEmojisLengthDescending 23.076928113636363 ms/op 22.664659066286415 ms/op 1.02
benchmark.EmojiManagerBenchmark.extractEmojisInOrderOnlyEmojisRandomOrder 24.606454317073172 ms/op 23.969543983812923 ms/op 1.03
benchmark.EmojiManagerBenchmark.removeAllEmojis 5.02797639 ms/op 4.701839011834302 ms/op 1.07
benchmark.EmojiManagerBenchmark.replaceAllEmojis 4.794875650717703 ms/op 5.439070801554223 ms/op 0.88
benchmark.EmojiManagerBenchmark.replaceAllEmojisFunction 5.091217299492386 ms/op 5.52193127506891 ms/op 0.92

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

CC: @felldo

Please sign in to comment.