com.tibco.forms.client.LoadStat
The com.tibco.forms.client.LoadStat class helps you to measure the load-time performance of the form. Each statistic has three fields: a description, a start time, and an end time. The times are measured in milliseconds from when the form load began.
To use com.tibco.forms.client.LoadStat, the form loading has to be complete, including data loading and invocation of form open rules. The TIBCO PageBus™ event 'com.tibco.forms.form.loaded' is published when the form loading is complete. The client application needs to subscribe to this event in order to be notified that the form loading is complete and then use the getLoadStats() method.
For example:
var callback = function(subject, form) { var stat = form.getLoadStats(); for (var i=0; i<stat.length; i++) { alert(stat[i].label+" | End Time : " + stat[i].endTime+" | Begin Time : " + stat[i].startTime); } } PageBus.subscribe('com.tibco.forms.form.loaded', null,callback); |
The details of the fields are as follows:
com.tibco.forms.client.LoadStat Class - Field Details
Field | Data Type |
Description |
---|---|---|
label |
String | Describes what is being measured by this particular loadstat. |
startTime |
Number | The time, in milliseconds, when this particular measurement phase began. This time is relative to the instant when the form load began. |
endTime |
Number | The time, in milliseconds, when this particular measurement phase ended. This time is relative to the instant when the form load began. |