-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core(fr): convert trace-elements gatherer #12442
Merged
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
abbff10
core(fr): convert trace-elements gatherer
adamraine 9070191
rn context
adamraine ffe39dc
fix tests
adamraine 10cf229
convert old tests
adamraine e30f536
i cant decide
adamraine f73fc4b
add to config
adamraine 8cd5172
use instrumentation
adamraine 4db9ee9
comments
adamraine 4935e46
bind
adamraine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,7 +159,7 @@ describe('Fraggle Rock API', () => { | |
const {lhr} = result; | ||
const {auditResults, failedAudits, erroredAudits} = getAuditsBreakdown(lhr); | ||
// TODO(FR-COMPAT): This assertion can be removed when full compatibility is reached. | ||
expect(auditResults.length).toMatchInlineSnapshot(`103`); | ||
expect(auditResults.length).toMatchInlineSnapshot(`105`); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
expect(erroredAudits).toHaveLength(0); | ||
|
||
const failedAuditIds = failedAudits.map(audit => audit.id); | ||
|
This file contains 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
This file contains 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
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.
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.
should these be in
stopInstrumentation
? does it matter?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.
this is tricky, I'm assuming that
Animation
domain needs to remain enabled forAnimation.resolveAnimation
to work?if not, then yeah definitely move to
stopInstrumentation
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.
why was the
await
removed though? I seem to recall bad things happening in LR if there are unhandled promise rejectionsThere 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.
alternate option: collect animation id -> name mapping by listening for
Animation.animationCreated
and fetching at the end ofstopInstrumentation
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.
I tried this and yeah,
Animation
domain needs to be enabled. When I moved it back I forgot theawait
though haha.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.
what do you think about the alternate option @adamraine? it's more code and possible more animation resolution at the benefit of more idiomatic "instrumentation" followed by the artifact computation.
I could see us going either way, just interested in your thoughts.
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.
We're still going to have some "instrumentation" in
getArtifact
when we callRuntime.callFunctionOn
. Some less destructive options I came up with:Animation.disable
entirelyAnimation.disable
instopInstrumentation
, then reenable it forgetArtifact
.I'll give your suggestion a shot though to see how destructive it is.
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.
So I went a little deep down this rabbit hole. I had trouble resolving the animation name from
animationCreated
events, however I found that we can just get the animation name directly fromanimationStarted
events. Kinda wish I had thought of this when I first added animated elements toTraceElements
😆