Skip to content

Commit 06043ec

Browse files
authored
PROF-9395: Use Profile.encodeAsync() (#165)
* Upgrade to pprof-format 2.1.0 * Use `Profile.encodeAsync()`
1 parent dc9eded commit 06043ec

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"delay": "^5.0.0",
3737
"node-gyp-build": "<4.0",
3838
"p-limit": "^3.1.0",
39-
"pprof-format": "^2.0.7",
39+
"pprof-format": "^2.1.0",
4040
"source-map": "^0.7.4"
4141
},
4242
"devDependencies": {

ts/src/profile-encoder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import {Profile} from 'pprof-format';
2121

2222
const gzipPromise = promisify(gzip);
2323

24-
export async function encode(profile: Profile): Promise<Buffer> {
25-
return gzipPromise(profile.encode());
24+
export function encode(profile: Profile): Promise<Buffer> {
25+
return profile.encodeAsync().then(gzipPromise);
2626
}
2727

2828
export function encodeSync(profile: Profile): Buffer {

0 commit comments

Comments
 (0)