1
- name : JMH Benchmark
1
+ name : Benchmark.js Example
2
2
on :
3
3
push :
4
4
branches :
@@ -13,22 +13,79 @@ permissions:
13
13
14
14
jobs :
15
15
benchmark :
16
- name : Run JMH benchmark example
16
+ name : Run JavaScript benchmark example
17
17
runs-on : ubuntu-latest
18
18
steps :
19
- - uses : actions/checkout@v3
20
- - uses : actions/setup-java@v2
21
- with :
22
- distribution : ' adopt'
23
- java-version : ' 11'
24
- - name : Cache SBT dependencies
25
- uses : coursier/cache-action@v6
26
- - name : Build and run JMH benchmark
27
- run : |
28
- sbt clean compile
29
- sbt 'benchmarks/jmh:run -i 1 -wi 0 -f1 -t1 -rf json -rff output.json .*'
30
- - name : JMH Benchmark Action
31
- uses : kitlangton/jmh-benchmark-action@main
19
+ - uses : actions/checkout@v2
20
+ - uses : actions/setup-node@v1
21
+ - name : Run benchmark
22
+ run : cd examples/benchmarkjs && npm install && node bench.js | tee output.txt
23
+
24
+ - name : Store benchmark result
25
+ uses : benchmark-action/github-action-benchmark@v1
32
26
with :
33
- jmh-output-path : benchmarks/output.json
34
- github-token : ${{ secrets.GITHUB_TOKEN }}
27
+ tool : ' benchmarkjs'
28
+ output-file-path : output.txt
29
+
30
+ # - name: Store benchmark result
31
+ # uses: benchmark-action/github-action-benchmark@v1
32
+ # with:
33
+ # name: Benchmark.js Benchmark
34
+ # tool: 'benchmarkjs'
35
+ # output-file-path: examples/benchmarkjs/output.txt
36
+ # github-token: ${{ secrets.GITHUB_TOKEN }}
37
+ # auto-push: true
38
+ # # Show alert with commit comment on detecting possible performance regression
39
+ # alert-threshold: '200%'
40
+ # comment-on-alert: true
41
+ # fail-on-alert: true
42
+
43
+ # - name: Store benchmark result - separate results repo
44
+ # uses: benchmark-action/github-action-benchmark@v1
45
+ # with:
46
+ # name: Benchmark.js Benchmark
47
+ # tool: 'benchmarkjs'
48
+ # output-file-path: examples/benchmarkjs/output.txt
49
+ # github-token: ${{ secrets.BENCHMARK_ACTION_BOT_TOKEN }}
50
+ # auto-push: true
51
+ # # Show alert with commit comment on detecting possible performance regression
52
+ # alert-threshold: '200%'
53
+ # comment-on-alert: true
54
+ # fail-on-alert: true
55
+ # alert-comment-cc-users: '@ktrz'
56
+ # gh-repository: 'github.com/benchmark-action/github-action-benchmark-results'
57
+
58
+ # name: JMH Benchmark
59
+ # on:
60
+ # push:
61
+ # branches:
62
+ # - main
63
+ # pull_request:
64
+ # branches:
65
+ # - main
66
+
67
+ # permissions:
68
+ # contents: write
69
+ # deployments: write
70
+
71
+ # jobs:
72
+ # benchmark:
73
+ # name: Run JMH benchmark example
74
+ # runs-on: ubuntu-latest
75
+ # steps:
76
+ # - uses: actions/checkout@v3
77
+ # - uses: actions/setup-java@v2
78
+ # with:
79
+ # distribution: 'adopt'
80
+ # java-version: '11'
81
+ # - name: Cache SBT dependencies
82
+ # uses: coursier/cache-action@v6
83
+ # - name: Build and run JMH benchmark
84
+ # run: |
85
+ # sbt clean compile
86
+ # sbt 'benchmarks/jmh:run -i 1 -wi 0 -f1 -t1 -rf json -rff output.json .*'
87
+ # - name: JMH Benchmark Action
88
+ # uses: kitlangton/jmh-benchmark-action@main
89
+ # with:
90
+ # jmh-output-path: benchmarks/output.json
91
+ # github-token: ${{ secrets.GITHUB_TOKEN }}
0 commit comments