Better perf script format detection#4187
Merged
mstange merged 1 commit intoAug 16, 2022
Merged
Conversation
Codecov Report
@@ 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
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
8fd109f to
4372721
Compare
canova
approved these changes
Aug 16, 2022
canova
left a comment
Member
There was a problem hiding this comment.
Looks great to me, thanks for the fix!
4372721 to
ff28d27
Compare
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.
ff28d27 to
6443ace
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
perf scriptformat is a text format that doesn't contain adistinctive 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.