Namespace jQuery.sap.measureModule: jquery.sap.global
Namespace for the jQuery performance measurement plug-in provided by SAP SE.
Method Summary
add(sId, sInfo, iStart, iEnd, iTime, iDuration, aCategories?)Adds a performance measurement with all data This is usefull to add external measurements (e.g.
filterInteractionMeasurements(fnFilter)Gets all interaction measurements for which a provided filter function returns a truthy value.
filterMeasurements(fnFilter?, bCompleted?, aCategories?)Gets all performance measurements where a provided filter function returns a truthy value.
registerMethod(sId, oObject, sMethod, aCategories?)Registers an average measurement for a given objects method
setActive(bOn, An)Activates or deactivates the performance measure functionality Optionally a category or list of categories can be passed to restrict measurements to certain categories like "javascript", "require", "xmlhttprequest", "render"
unregisterMethod(sId, oObject, sMethod)Unregisters an average measurement for a given objects method
 Method Detail 
 add(sId, sInfo, iStart, iEnd, iTime, iDuration, aCategories?): object
 Adds a performance measurement with all data This is usefull to add external measurements (e.g. from a backend) to the common measurement UI 
Parameters:
| {string} | sId | ID of the measurement | 
| {string} | sInfo | Info for the measurement | 
| {int} | iStart | start timestamp | 
| {int} | iEnd | end timestamp | 
| {int} | iTime | time in milliseconds | 
| {int} | iDuration | effective time in milliseconds | 
| {string|string[]} | aCategories?, Default: "javascript" | An optional list of categories for the measure | 
Returns:
| {object} | [] current measurement containing id, info and start-timestamp, end-timestamp, time, duration, categories (false if error) | 
 average(sId, sInfo, aCategories?): object
 Starts an average performance measure. The duration of this measure is an avarage of durations measured for each call. Optionally a category or list of categories can be passed to allow filtering of measurements. 
Parameters:
| {string} | sId | ID of the measurement | 
| {string} | sInfo | Info for the measurement | 
| {string|string[]} | aCategories?, Default: "javascript" | An optional list of categories for the measure | 
Returns:
| {object} | current measurement containing id, info and start-timestamp (false if error) | 
 end(sId): object
 Ends a performance measure 
Parameters:
| {string} | sId | ID of the measurement | 
Returns:
| {object} | current measurement containing id, info and start-timestamp, end-timestamp, time, duration (false if error) | 
 endInteraction(bForce)
 End an interaction measurements 
Parameters:
| {boolean} | bForce | forces end of interaction now and ignores further re-renderings | 
- Since:
- 1.34.0
 filterInteractionMeasurements(fnFilter): object[]
 Gets all interaction measurements for which a provided filter function returns a truthy value. To filter for certain categories of measurements a fnFilter can be implemented like this 
 function(oInteractionMeasurement) { return oInteractionMeasurement.duration > 0 }Parameters:
| {function} | fnFilter | a filter function that returns true if the passed measurement should be added to the result | 
- Since:
- 1.36.2
Returns:
| {object[]} | all interaction measurements passing the filter function successfully | 
 filterMeasurements(fnFilter?, bCompleted?, aCategories?): object
 Gets all performance measurements where a provided filter function returns a truthy value. If neither a filter function nor a category is provided an empty array is returned. To filter for certain properties of measurements a fnFilter can be implemented like this 
 function(oMeasurement) { return oMeasurement.duration > 50; }Parameters:
| {function} | fnFilter? | a filter function that returns true if the passed measurement should be added to the result | 
| {boolean|undefined} | bCompleted? | Optional parameter to determine if either completed or incomplete measurements should be returned (both if not set or undefined) | 
| {string[]} | aCategories? | The function returns only measurements which match these specified categories | 
- Since:
- 1.34.0
Returns:
| {object} | [] filtered array with measurements containing id, info and start-timestamp, end-timestamp, time, duration, categories (false if error) | 
 getActive(): boolean
 Gets the current state of the perfomance measurement functionality 
Returns:
| {boolean} | current state of the perfomance measurement functionality | 
 getAllInteractionMeasurements(bFinalize): object[]
 Gets all interaction measurements 
Parameters:
| {boolean} | bFinalize | finalize the current pending interaction so that it is contained in the returned array | 
- Since:
- 1.34.0
Returns:
| {object[]} | all interaction measurements | 
 getAllMeasurements(bCompleted?): object[]
 Gets all performance measurements 
Parameters:
| {boolean} | bCompleted? | Whether only completed measurements should be returned, if explicitly set to false only incomplete measurements are returned | 
Returns:
| {object[]} | current array with measurements containing id, info and start-timestamp, end-timestamp, time, duration, categories | 
 getMeasurement(sId): object
 Gets a performance measure 
Parameters:
| {string} | sId | ID of the measurement | 
Returns:
| {object} | current measurement containing id, info and start-timestamp, end-timestamp, time, duration (false if error) | 
 getRequestTimings(): object[]
 Gets the current request timings array for type 'resource' safely 
- Since:
- 1.34.0
Returns:
| {object[]} | array of performance timing objects | 
 pause(sId): object
 Pauses a performance measure 
Parameters:
| {string} | sId | ID of the measurement | 
Returns:
| {object} | current measurement containing id, info and start-timestamp, pause-timestamp (false if error) | 
 registerMethod(sId, oObject, sMethod, aCategories?): boolean
 Registers an average measurement for a given objects method 
Parameters:
| {string} | sId | the id of the measurement | 
| {object} | oObject | the object of the method | 
| {string} | sMethod | the name of the method | 
| {string[]} | aCategories?, Default: ["javascript"] | An optional categories list for the measurement | 
- Since:
- 1.34.0
Returns:
| {boolean} | true if the registration was successful | 
 resume(sId): object
 Resumes a performance measure 
Parameters:
| {string} | sId | ID of the measurement | 
Returns:
| {object} | current measurement containing id, info and start-timestamp, resume-timestamp (false if error) | 
 setActive(bOn, An): boolean
 Activates or deactivates the performance measure functionality Optionally a category or list of categories can be passed to restrict measurements to certain categories like "javascript", "require", "xmlhttprequest", "render" 
Parameters:
| {boolean} | bOn | state of the perfomance measurement functionality to set | 
| {string|string[]} | An | optional list of categories that should be measured | 
Returns:
| {boolean} | current state of the perfomance measurement functionality | 
 setRequestBufferSize(iSize)
 Sets the request buffer size for the measurement safely 
Parameters:
| {int} | iSize | size of the buffer | 
- Since:
- 1.34.0
 start(sId, sInfo, aCategories?): object
 Starts a performance measure. Optionally a category or list of categories can be passed to allow filtering of measurements. 
Parameters:
| {string} | sId | ID of the measurement | 
| {string} | sInfo | Info for the measurement | 
| {string|string[]} | aCategories?, Default: "javascript" | An optional list of categories for the measure | 
Returns:
| {object} | current measurement containing id, info and start-timestamp (false if error) | 
 startInteraction(sType, oSrcElement)
 Start an interaction measurements 
Parameters:
| {string} | sType | type of the event which triggered the interaction | 
| {object} | oSrcElement | the control on which the interaction was triggered | 
- Since:
- 1.34.0
 unregisterMethod(sId, oObject, sMethod): boolean
 Unregisters an average measurement for a given objects method 
Parameters:
| {string} | sId | the id of the measurement | 
| {object} | oObject | the object of the method | 
| {string} | sMethod | the name of the method | 
- Since:
- 1.34.0
Returns:
| {boolean} | true if the unregistration was successful |