I work on an internal corporate system that has a web front-end using Tomcat.
EDIT: Ideally, I need to monitor the rendering on the clients accessing the pages.
The total Render Time cannot be measured directly, but you can measure the time taken for your webpage to start rendering, The Start Render Metrics. The Start Render metric can be measured using the WebPage Test, and you have a section of the page performance result which show you the Start Render metric score.
Render time is the metric that refers to the time it takes for a website or web app to load enough that the user can actually interact with the page. While quite similar to load time which measures the time it takes for a page to become visible, render time will tell you how soon your app or website is usable.
How Do You Measure Start Render Time? Measuring start render time can only be done by noting the exact time the first interactive asset appears on the user's viewport. This can be done in real time with the Edgemesh Portal, or on demand with a tool like WebPageTest by Catchpoint.
When a web page is loaded, the browser first reads the HTML text and constructs DOM Tree from it. Then it processes the CSS whether that is inline, embedded, or external CSS and constructs the CSSOM Tree from it. After these trees are constructed, then it constructs the Render-Tree from it.
The Navigation Timing API is available in modern browsers (IE9+) except Safari:
function onLoad() {
var now = new Date().getTime();
var page_load_time = now - performance.timing.navigationStart;
console.log("User-perceived page loading time: " + page_load_time);
}
In case a browser has JavaScript enabled one of the things you could do is to write an inline script and send it first thing in your HTML. The script would do two things:
<script language="JavaScript">
var renderStart = new Date().getTime();
window.onload=function() {
var elapsed = new Date().getTime()-renderStart;
// send the info to the server
alert('Rendered in ' + elapsed + 'ms');
}
</script>
... usual HTML starts here ...
You'd need to make sure that the page doesn’t override onload later in the code, but adds to the event handlers list instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With