@@ -192,8 +192,8 @@ jobs:
192192 retention-days : 10
193193
194194
195- cpd-bench -fmt :
196- name : perf-fmt
195+ cdp-perf -fmt :
196+ name : cdp- perf-fmt
197197 needs : cdp-bench
198198
199199 # Don't execute on PR
@@ -216,3 +216,71 @@ jobs:
216216
217217 - name : format and send json result
218218 run : /perf-fmt cdp ${{ github.sha }} bench.json
219+
220+ hyperfine-bench :
221+ name : hyperfine-bench
222+ needs : zig-build-release
223+
224+ # use a self host runner.
225+ runs-on : lpd_bench_m5.large
226+ timeout-minutes : 15
227+
228+ steps :
229+ - uses : actions/checkout@v4
230+ with :
231+ repository : ' lightpanda-io/demo'
232+ fetch-depth : 0
233+
234+ - run : npm install
235+
236+ - name : download artifact
237+ uses : actions/download-artifact@v4
238+ with :
239+ name : lightpanda-build-release
240+
241+ - run : chmod a+x ./lightpanda
242+
243+ - name : run puppeteer
244+ run : |
245+ go run ws/main.go & echo $! > WS.pid
246+ hyperfine --export-json=hyperfine.json --warmup 3 --runs 20 --shell=none "./lightpanda --dump http://127.0.0.1:1234/campfire-commerce/"
247+ kill `cat WS.pid`
248+
249+ - name : write commit
250+ run : |
251+ echo "${{github.sha}}" > commit.txt
252+
253+ - name : upload artifact
254+ uses : actions/upload-artifact@v4
255+ with :
256+ name : hyperfine-results
257+ path : |
258+ hyperfine.json
259+ commit.txt
260+ retention-days : 10
261+
262+
263+ hyperfine-perf-fmt :
264+ name : hyperfine-perf-fmt
265+ needs : hyperfine-bench
266+
267+ # Don't execute on PR
268+ if : github.event_name != 'pull_request'
269+
270+ runs-on : ubuntu-latest
271+ timeout-minutes : 15
272+
273+ container :
274+ image : ghcr.io/lightpanda-io/perf-fmt:latest
275+ credentials :
276+ username : ${{ github.actor }}
277+ password : ${{ secrets.GITHUB_TOKEN }}
278+
279+ steps :
280+ - name : download artifact
281+ uses : actions/download-artifact@v4
282+ with :
283+ name : hyperfine-results
284+
285+ - name : format and send json result
286+ run : /perf-fmt hyperfine ${{ github.sha }} hyperfine.json
0 commit comments