Skip to content

Commit

Permalink
PROF-9395: Use Profile.encodeAsync() (#165)
Browse files Browse the repository at this point in the history
* Upgrade to pprof-format 2.1.0

* Use `Profile.encodeAsync()`
  • Loading branch information
szegedi committed Mar 25, 2024
1 parent dc9eded commit 06043ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"delay": "^5.0.0",
"node-gyp-build": "<4.0",
"p-limit": "^3.1.0",
"pprof-format": "^2.0.7",
"pprof-format": "^2.1.0",
"source-map": "^0.7.4"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions ts/src/profile-encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import {Profile} from 'pprof-format';

const gzipPromise = promisify(gzip);

export async function encode(profile: Profile): Promise<Buffer> {
return gzipPromise(profile.encode());
export function encode(profile: Profile): Promise<Buffer> {
return profile.encodeAsync().then(gzipPromise);
}

export function encodeSync(profile: Profile): Buffer {
Expand Down

0 comments on commit 06043ec

Please sign in to comment.