enhance(svg-tester): capture performance data #2915
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So, I was curious about performance metrics of grapher, both loading time and memory usage.
To get an overview, I adapted the SVG Tester with some readouts for time taken and memory usage, and these will then be dumped into the
results.csv
file.This is easy to do for time taken for rendering, but what's a bit more tricky is getting an accurate readout of the memory consumption (heap used).
To do this in a somewhat good way, I added a (kind of hacky)
--isolate
mode that will run all the exports sequentially, and runs each in a fresh process. This takes an awfully long time, but it is actually accurate.If you're curious about the results we get out of this, the results on my machine I put into a Google Sheet here: https://docs.google.com/spreadsheets/d/1Wzz76EYyOT0vo6uqQVMvvAQh0tOJyxcyJuUFfowpzbA/edit?usp=sharing