-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: add memory-spike plugin #33
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of creating a function inside globalThis, I'd add all the context into the beforeClockTemplate
. Also, I wouldn't perform memory translations during the collect process, instead, you can do it textReporter. Just check if bench.plugins includes this new plugin.
getReport() { | ||
process._rawDebug('grp',arguments); | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to brainstorm what to produce as the report - or is producing results enough? If we get it right, the report might be nice tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is called by the reporters, and it should return a string in case you want to show it there. See on textReporter
|
||
### Class: `RecordMemorySpikePlugin` | ||
|
||
A plugin to record memory allocation spikes in your benchmark's run. It should help you understand the speed vs memory tradeoffs you're making. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mention folks that are going to use it will need to pass --expose-gc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also mention a possible performance inconsistency when this plugin is enabled due to GC blocking op.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm only calling gc in oncomplete, which I assumed is not part of the span that is being measured. is that incorrect?
Co-authored-by: Rafael Gonzaga <rafael.nunu@hotmail.com>
|
it took going on holiday again, but here it is
open questions:
__recordMemorySpike
going to cause trouble in workers?