title: Log the number of change detections in Angular (Globally)
body: <p>I need to see how many change detection cycles are running in my app ( <em>and who initiated it</em>)  - which has many many components.</p>
  
  <p>Currently  , I know that  , at each component  , I can use  the <code>ngDoCheck</code> method :</p>
  
  <ul>
  <li><code>ngDoCheck()</code></li>
  </ul>
  
  <blockquote>
    <p>Detect and act upon changes that Angular can't or won't detect on its
    own. Called during every change detection run, immediately after
    ngOnChanges() and ngOnInit().</p>
  </blockquote>
  
  <p>This is not a bad solution.</p>
  
  <p><strong>Question:</strong></p>
  
  <p>But - is there a way to do it <em>globally</em> ? I mean  , I really don't want to modify each component and add this code.</p>
  
  <p>Is there a way that the "listener &amp; Logger" will be in a global scope so that i'll know  which part of my app causes many change detection cycles?</p>
  
  <p>My goal (if possible) :</p>
  
  <pre><code>(console.log) -- from component A
  (console.log) -- from component A
  (console.log) -- from component A
  
  (console.log) -- from component B
  
  (console.log) -- from component C
  (console.log) -- from component C
  </code></pre>