The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 802 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.1 (Linux)
File Line Function
/showthread.php 802 errorHandler->error



Current time: 12-16-2019, 10:45 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
W3C User Timing in Angular
03-01-2019, 02:12 AM
Post: #1
W3C User Timing in Angular
I am attempting to insert User Timing Marks into an Angular App. I want to measure when a content element on the page is displayed. For example, I'd like to find out when content ATF has rendered.

The content is within the app.component.html file so I thought that it made sense to place there. But it appears that when the page renders, the timing marks do not display when I look at the Chrome Dev tools timing area.

I am using the sample Angular setup page:

<!--The content below is only a placeholder and can be replaced.-->
<script>window.performance && performance.mark && performance.mark("ATFAreaBegin")</script>


<div style="text-align:center">
<h1>
Test Page {{ title }}!
</h1>


</div>
<h2>Here are some links to help you start: </h2>
<ul>
<li>
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a></h2>
</li>
<li>
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
</li>
</ul>
<script>window.performance && performance.mark && performance.mark("ATFAreaEnd")</script>
<script>window.performance && performance.measure && performance.measure("ATFDuration", "ATFAreaBegin", "ATFAreEnd");</script>

At a basic level, does anyone have any example of how to accomplish this in Angular? I haven't been able to find any documentation with a specific example. Any marks within the index.html page are output.

Any information would really be helpful.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
W3C User Timing in Angular - chelvan - 03-01-2019 02:12 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)