Skip to content
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

Update user timing to record the timeout deadline with 'waiting' events #12479

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ran prettier
  • Loading branch information
flarnie committed Mar 29, 2018
commit f065c9e199ccfdacb09357af432830c0b97bee68
9 changes: 7 additions & 2 deletions packages/react-reconciler/src/ReactDebugFiberPerf.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,18 @@ export function startRequestCallbackTimer(): void {
}
}

export function stopRequestCallbackTimer(didExpire: boolean, expirationTime: number): void {
export function stopRequestCallbackTimer(
didExpire: boolean,
expirationTime: number,
): void {
if (enableUserTimingAPI) {
if (supportsUserTiming) {
isWaitingForCallback = false;
const warning = didExpire ? 'React was blocked by main thread' : null;
endMark(
`(Waiting for async callback... will force flush in ${expirationTime} ms)`,
`(Waiting for async callback... will force flush in ${
expirationTime
} ms)`,
'(Waiting for async callback...)',
warning,
);
Expand Down