-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Perfomance] Add is_initial_load
meta
#206645
Merged
Merged
Changes from 17 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
d61eb1d
[Perfomance] Add `is_initial_load` meta
kpatticha 42bb08a
Merge branch 'main' into 4185-initial-load
kpatticha d03ad87
Merge branch 'main' into 4185-initial-load
kpatticha 06e16e0
Merge branch 'main' of github.com:elastic/kibana into 4185-initial-load
kpatticha 4d6fde0
[APM] Refactor ttmp instrumentation
kpatticha 4e914cc
[Performance] Add ability to track ttfmp on refresh
kpatticha 08662d7
Remove target
kpatticha 7302198
[Infra] Track tttmp on refresh
kpatticha 427f1a2
clean up
kpatticha 23f4b1f
Merge branch 'main' of github.com:elastic/kibana into 4185-initial-load
kpatticha ae7659f
Keep the logic in parent component
kpatticha 4fca592
Address PR comments
kpatticha 91fcf76
Update tests
kpatticha f7f9fdc
Merge branch 'main' of github.com:elastic/kibana into 4185-initial-load
kpatticha 662cb3b
Merge branch 'main' into 4185-initial-load
elasticmachine 23c098e
Fix eslint
kpatticha 0ec81ef
Merge branch '4185-initial-load' of github.com:kpatticha/kibana into …
kpatticha da1b2c9
Rename markPerformanceRefreshStart to onPageRefreshStart
kpatticha 4dd16aa
Fix tests
kpatticha 294a3e5
Fix onRefresh for metrics explorer
kpatticha 8914b20
Fix lint
kpatticha 8fda218
Merge branch 'main' of github.com:elastic/kibana into 4185-initial-load
kpatticha 4edf641
Fix apm tests
kpatticha 466045c
Fix tests
kpatticha c9be509
trigger onPageReady only when data changes
kpatticha 3a95be3
Fix infra tests
kpatticha 117d6a2
Merge branch 'main' into 4185-initial-load
elasticmachine 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
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 | ||||
---|---|---|---|---|---|---|
|
@@ -15,6 +15,19 @@ export interface PerformanceApi { | |||||
* @param eventData - Data to send with the performance measure, conforming the structure of a {@link EventData}. | ||||||
*/ | ||||||
onPageReady(eventData?: EventData): void; | ||||||
/** | ||||||
* Marks the start of a page refresh event for performance tracking. | ||||||
* This method adds a performance marker start::pageRefresh to indicate when a page refresh begins. | ||||||
* | ||||||
* Usage: | ||||||
* ```ts | ||||||
* markPerformanceRefreshStart(); | ||||||
* ``` | ||||||
* | ||||||
* The marker set by this function can later be used in performance measurements | ||||||
* along with an end marker end::pageReady to determine the total refresh duration. | ||||||
*/ | ||||||
markPerformanceRefreshStart(): void; | ||||||
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.
Suggested change
To be consistent with 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. Thanks for the suggestion. I will update |
||||||
} | ||||||
|
||||||
export const PerformanceContext = createContext<PerformanceApi | undefined>(undefined); | ||||||
|
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
Oops, something went wrong.
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.
Just curious, is there a scenario in which the
onPageReady
is called, but none of these two conditions are called?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.
You mean
startPageRefresh
?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.
No, I mean the
onPageReady
function, which has this logic; suppose that it is called, but none of these two conditions are met. Is it possible?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 don't think it's possible. At least the first statement will always be true at least once. In the initial load.