mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 02:30:21 +08:00
[client-app] Measure and record times for opening account windows
Summary: See title Test Plan: manual Reviewers: spang, halla, evan Reviewed By: halla, evan Differential Revision: https://phab.nylas.com/D4017
This commit is contained in:
parent
ecf3709669
commit
feda238d9c
2 changed files with 9 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
import React from 'react';
|
||||
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
|
||||
import {Actions} from 'nylas-exports'
|
||||
import OnboardingStore from './onboarding-store';
|
||||
import PageTopBar from './page-top-bar';
|
||||
|
||||
|
@ -41,6 +42,13 @@ export default class OnboardingRoot extends React.Component {
|
|||
this.unsubscribe = OnboardingStore.listen(this._onStateChanged, this);
|
||||
NylasEnv.center();
|
||||
NylasEnv.displayWindow();
|
||||
if (NylasEnv.timer.isPending('open-add-account-window')) {
|
||||
Actions.recordPerfMetric({
|
||||
action: 'open-add-account-window',
|
||||
actionTimeMs: NylasEnv.timer.stop('open-add-account-window'),
|
||||
maxValue: 4000,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
|
@ -301,6 +301,7 @@ export default class Application extends EventEmitter {
|
|||
});
|
||||
|
||||
this.on('application:add-account', ({existingAccount, accountType} = {}) => {
|
||||
this.timer.start('open-add-account-window')
|
||||
const onboarding = this.windowManager.get(WindowManager.ONBOARDING_WINDOW);
|
||||
if (onboarding) {
|
||||
if (onboarding.browserWindow.webContents) {
|
||||
|
|
Loading…
Reference in a new issue