I need to know if there is any way to find tableau api (viz) loading/rendering time in a webpage using javascript/jquery. I want to add some diagnostic info collection to the page. I thought I could add a timer that shows how long tableau api took to render the viz. Once I have the value, I want to show it to the console (chrome or firefox) during the debugging process.

My code looks this, but I am not sure if I am on right track to do this. Please let me know if you can help me to find a way. Thanks!

//Initialize the viz

function startVIZ() {

var divholder = document.getElementById("tableauViz");

var options = {

hideTabs: true,

hideToolbar: true,

// onFirstInteractive is a callback that happens once the Viz is loaded