-
Notifications
You must be signed in to change notification settings - Fork 148
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
✨ [RUMF-1207] collect concurrent actions #1421
Closed
Closed
Conversation
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
Let's start with a light refactoring: this commit splits the `parentContexts` logic in two to make it easier to follow view and action parent context collection independently.
* Simplify the test context from `{ value: string }` to `string`. As we'll write a few more tests, it will help to have more concise values. * `startClocks` is in fact called `startTime` in the code * Add a test to make sure that calling `find()` without argument does not return the last closed context.
Because we'll have multiple concurrent action entries, we need to change the `ContextHistory` to support this. With this commit: * instead of keeping a reference to the current active context, the context history now returns the reference with associated methods to "close" and "remove" it. It is now up to the code using context history to keep one or multiple references to the active contexts. * a new `findAll` method is introduced returning a list of contexts instead of a single context that we'll use to get multiple action ids.
This commit changes the `action.id` typings to support either a single string or an array. It impacts: * any event that can be an action child * the internal monitoring context * the internal context, so logs will also inherit from this change
This changes `parentContexts.findAction` to track multiple pending actions that would be sent through the LifeCycle. Instead of using a single variable to track the current history entry, it uses a map associating the action id to the history entry.
dcf18df
to
41f110a
Compare
We need to call `waitIdlePage` for every created action, similarly to `trackEventCounts`. This commit moves it closer to `trackEventCounts`, so the action lifecycle is contained at a single place. It will be easier to manage multiple concurrent actions.
Finally, remove the "one action at a time" limitation and collect a new action for every click, even if another one is ongoing. To do this, we still need to keep a reference to pending actions because we need to discard them: * when a view is created (this will be removed in a future PR) * when stopping action collections (for tests) This is somewhat cumbersome, but not a huge deal either.
41f110a
to
9d508dd
Compare
Superseded by #1432 |
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.
Motivation
Ignore less click actions by sending concurrent automatic actions.
Changes
Please refer to the commit messages
Testing
I have gone over the contributing documentation.