8000 Expose mechanism to monitor render events by kpdecker · Pull Request #2655 · vercel/next.js · GitHub
[go: up one dir, main page]

Skip to content

Expose mechanism to monitor render events #2655

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

Merged
merged 3 commits into from
Oct 30, 2017

Conversation

kpdecker
Copy link
Contributor

Doing this to allow for live-tracking of startup performance of our app in production.

Example:

let renderStart = Date.now();

emitter.on('before-reactdom-render', () => {
  renderStart = Date.now();
});

emitter.on('after-reactdom-render', ({ appProps }) => {
  const duration = Date.now() - renderStart;
  trackDuration('ui.page.render', duration, {
    route: appProps.router.asPath,
  });
});

Copy link
Member
@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kpdecker
Copy link
Contributor Author

Both cases should run when in dev mode.

@kpdecker
Copy link
Contributor Author

Ping

@kpdecker kpdecker changed the base branch from v3-beta to master August 19, 2017 13:05
@kpdecker
Copy link
Contributor Author

@timneutkens @arunoda rebased against master.

Copy link
Member
@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets take this in

@timneutkens timneutkens merged commit 6e44cde into vercel:master Oct 30, 2017
timneutkens pushed a commit to timneutkens/next.js that referenced this pull request Nov 5, 2017
* Allow custom clientBootstrap entrypoint

This allows for customization of the client global bootstrap.

* Expose render event emitter to client

* Include client entry point in npm package
@kpdecker kpdecker deleted the entry-tracking branch November 6, 2017 13:43
@lock
Copy link
lock bot commented May 10, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0