Created
March 9, 2021 22:56
-
-
Save vatsalkgor/3e7988c772eb2e069d0b836d5e0ad5d6 to your computer and use it in GitHub Desktop.
Measure Angular change detection cycle time
This file contains hidden or 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
import 'hammerjs'; | |
/** | |
* @license | |
* Copyright Akveo. All Rights Reserved. | |
* Licensed under the MIT License. See License.txt in the project root for license information. | |
*/ | |
import { ApplicationRef, enableProdMode } from '@angular/core'; | |
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
import { AppModule } from './app/app.module'; | |
import { environment } from './environments/environment'; | |
import { enableDebugTools } from '@angular/platform-browser'; | |
if (environment.production) { | |
enableProdMode(); | |
} | |
platformBrowserDynamic().bootstrapModule(AppModule) | |
.then(module=> enableDebugTools(module.injector.get(ApplicationRef).components[0])) | |
.catch(err => console.error(err)); | |
// In console type following | |
ng.profiler.timeChangeDetection() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment