Better perf script format detection
The perf script format is a text format that doesn't contain a
distinctive header. Our detection was too general and was incorrectly
detecting JSON profiles as perf script profiles.
Now we bail out if the file starts with an opening brace.
I've also simplified how we treat perf script profiles with header. Rather than skipping the header and detecting the first sample, we just detect the header.
Codecov Report
Merging #4187 (ff28d27) into main (b7eba13) will increase coverage by
0.00%. The diff coverage is100.00%.
:exclamation: Current head ff28d27 differs from pull request most recent head 6443ace. Consider uploading reports for the commit 6443ace to get more accurate results
@@ Coverage Diff @@
## main #4187 +/- ##
=======================================
Coverage 88.45% 88.46%
=======================================
Files 280 280
Lines 24528 24527 -1
Branches 6535 6536 +1
=======================================
Hits 21697 21697
+ Misses 2629 2628 -1
Partials 202 202
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/profile-logic/import/linux-perf.js | 96.46% <100.00%> (+0.84%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.