-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save profiles when running startLocal #95
Conversation
0bcd957
to
47b7daf
Compare
Codecov Report
@@ Coverage Diff @@
## master #95 +/- ##
==========================================
- Coverage 95.77% 93.16% -2.61%
==========================================
Files 6 6
Lines 355 366 +11
Branches 58 60 +2
==========================================
+ Hits 340 341 +1
- Misses 15 25 +10
Continue to review full report at Codecov.
|
a54f748
to
e15ec65
Compare
e15ec65
to
b9489ed
Compare
PTAL |
@@ -148,13 +151,27 @@ export async function startLocal(config: Config = {}): Promise<void> { | |||
if (!config.disableHeap) { | |||
const heap = await profiler.profile( | |||
{name: 'HEAP-Profile' + new Date(), profileType: 'HEAP'}); | |||
const decodedBytes = Buffer.from(heap.profileBytes as 'string', 'base64'); | |||
fs.writeFile( |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Should this PR be closed or submitted? |
I think I'll close this. If startLocal does save profiles, it should probably be only when the user specifies this. |
Right now, profiles are thrown away when running startLocal. With this change, profiles will be written out to files.