Allow loading gzipped profiles from more endpoints#5215
Conversation
- Move gzip handling to unserializeProfileOfArbitraryFormat method to enable proper handling of gzipped profiles from more endpoints - Fix tests which were incorrectly passing promise as payload instead of the compressed profile as ArrayBuffer.
e11172f to
72137d5
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5215 +/- ##
=======================================
Coverage 88.62% 88.62%
=======================================
Files 308 308
Lines 28059 28059
Branches 7598 7598
=======================================
Hits 24867 24867
Misses 2978 2978
Partials 214 214 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
|
Thanks, I've been wanting to do that for some time. We'll try to look at it shortly! |
| const { getState, view } = await setupTestWithFile({ | ||
| type: '', | ||
| payload: compress(serializeProfile(profile)), | ||
| payload: (await compress(serializeProfile(profile))).buffer, |
There was a problem hiding this comment.
is the problem that this was returned an UInt8Array but other APIs were wanting a ArrayBuffer?
There was a problem hiding this comment.
The problem was, this was returning promise whereas it was expecting ArrayBuffer. The promise was getting converted to empty object, which did not throw any errors as it went into some other path. Sorry, I don't recall the exact path it took now, but I understood it was not testing what we wanted.
julienw
left a comment
There was a problem hiding this comment.
Thanks, this looks good to me.
[Sean Kim] Add Class of Service for a request in the profiler network tab (#5228) [Nisarg Jhaveri] Allow loading gzipped profiles from more endpoints (#5215) [Nicolas Chevobbe] Adapt Tree row toggle button to High Contrast Mode. (#5238) [Jon Coppeard] Display malloc heap size data in GCMajor markers (#5239) [Nicolas Chevobbe] Opt-out of forced-colors for colored-square and colored-border (#5237) [Yuval Mizrachi] Support colored bandwidth and memory tracks (#5232) [Nicolas Chevobbe] Adapt context menu to High Contrast Mode (#5244) [Nazım Can Altınova] Show Chrome extension instructions in the homepage if visited from Chromium browsers (#5251) And thanks to our localizers: de: Michael Köhler en-GB: Ian Neal fr: Théo Chevalier fr: felash fy-NL: Fjoerfoks it: Francesco Lodolo [:flod] nl: Mark Heijl pt-BR: Marcelo Ghelman ru: Valery Ledovskoy uk: Francesco Lodolo [:flod] uk: Markevych Dmytro Vitaliyovych zh-CN: Olvcpr423
…5215) - Move gzip handling to unserializeProfileOfArbitraryFormat method to enable proper handling of gzipped profiles from more endpoints - Fix tests which were incorrectly passing promise as payload instead of the compressed profile as ArrayBuffer.
Fix #5214