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