-
Notifications
You must be signed in to change notification settings - Fork 626
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(frontend): allow to export flamegraph json #616
Conversation
size-limit report 📦
|
Codecov Report
@@ Coverage Diff @@
## main #616 +/- ##
=======================================
Coverage 76.28% 76.28%
=======================================
Files 43 43
Lines 1454 1454
Branches 284 284
=======================================
Hits 1109 1109
Misses 313 313
Partials 32 32
Continue to review full report at Codecov.
|
ParametersDetails
Result
Details
Screenshots |
e69b5a4
to
b8bece3
Compare
exportName: string | ||
) { | ||
const dataStr = `data:text/json;charset=utf-8,${encodeURIComponent( | ||
JSON.stringify(exportObj) |
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.
for large files, could we do use something like this? https://github.com/eligrey/FileSaver.js
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.
Good idea, I'm going to be bold here and leave as it is until it become a problem though. I believe our flamegraphs are small enough for that to become an issue.
Love it! How hard would it be to also add pprof export option? You can use the same render url and set |
After looking more at this I'm wondering would it be easier to add in the "metadata" that you were mentioning as part of this PR? We could also do separately if that's going to complicate things somewhere else |
@petethepig @Rperry2174 Let's do pprof in a diff PR, since that requires updates to the metadata. |
Not optimal but it works.
Currently scoped to
single
flamegraphs (ie. singel view, comparison diff but NOT diff view, since we don't support importing that yet).Had to store the raw response from /render in the store since that's what adhoc expects. Yadda yadda
deltaDiffWrapper
is troublesome.