Skip to content

Commit

Permalink
feat: add flamegraph-upload
Browse files Browse the repository at this point in the history
  • Loading branch information
anhnd350309 committed Feb 11, 2025
1 parent d5103dd commit 9c1892c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/flamegraph-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Flamegraph Upload
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"

- shell: bash
run: |
pnpm install --no-frozen-lockfile
- shell: bash
run: |
pnpm run flamegraph
- uses: pyroscope-io/flamegraph.com-github-action@main
with:
file: flamegraph.pprof
2 changes: 1 addition & 1 deletion packages/object/tests/hashgraph.flamegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function prof() {
});

const buf = await pprof.encode(profile);
fs.writeFile("flamegraph.pb.gz", buf, (err) => {
fs.writeFile("flamegraph.pprof", buf, (err) => {
if (err) {
throw err;
}
Expand Down

0 comments on commit 9c1892c

Please sign in to comment.