Namespace jQuery.sap.measureModule: jquery.sap.global


Namespace for the jQuery performance measurement plug-in provided by SAP SE.
Method Summary
jQuery.sap.measure.add(sId, sInfo, iStart, iEnd, iTime, iDuration, aCategories?)Adds a performance measurement with all data This is useful to add external measurements (e.g.
jQuery.sap.measure.average(sId, sInfo, aCategories?)Starts an average performance measure.
jQuery.sap.measure.clear()Clears all performance measurements
jQuery.sap.measure.clearInteractionMeasurements()Clears all interaction measurements
jQuery.sap.measure.clearRequestTimings()Clears all request timings safely.
jQuery.sap.measure.end(sId)Ends a performance measure
jQuery.sap.measure.endInteraction(bForce)End an interaction measurements
jQuery.sap.measure.filterInteractionMeasurements(fnFilter)Gets all interaction measurements for which a provided filter function returns a truthy value.
jQuery.sap.measure.filterMeasurements(fnFilter?, bCompleted?, aCategories?)Gets all performance measurements where a provided filter function returns a truthy value.
jQuery.sap.measure.getActive()Gets the current state of the perfomance measurement functionality
jQuery.sap.measure.getAllInteractionMeasurements(bFinalize)Gets all interaction measurements
jQuery.sap.measure.getAllMeasurements(bCompleted?)Gets all performance measurements
jQuery.sap.measure.getMeasurement(sId)Gets a performance measure
jQuery.sap.measure.getRequestTimings()Gets the current request timings array for type 'resource' safely
jQuery.sap.measure.pause(sId)Pauses a performance measure
jQuery.sap.measure.registerMethod(sId, oObject, sMethod, aCategories?)Registers an average measurement for a given objects method
jQuery.sap.measure.remove(sId)Removes a performance measure
jQuery.sap.measure.resume(sId)Resumes a performance measure
jQuery.sap.measure.setRequestBufferSize(iSize)Sets the request buffer size for the measurement safely.
jQuery.sap.measure.start(sId, sInfo, aCategories?)Starts a performance measure.
jQuery.sap.measure.startInteraction(sType, oSrcElement)Start an interaction measurements
jQuery.sap.measure.unregisterAllMethods()Unregisters all average measurements
jQuery.sap.measure.unregisterMethod(sId, oObject, sMethod)Unregisters an average measurement for a given objects method
setActive(bOn, aCategories)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"
Method Detail
jQuery.sap.measure.add(sId, sInfo, iStart, iEnd, iTime, iDuration, aCategories?): object
Adds a performance measurement with all data This is useful to add external measurements (e.g. from a backend) to the common measurement UI
Parameters:
stringsIdID of the measurement
stringsInfoInfo for the measurement
intiStartstart timestamp
intiEndend timestamp
intiTimetime in milliseconds
intiDurationeffective 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)
jQuery.sap.measure.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:
stringsIdID of the measurement
stringsInfoInfo for the measurement
string|string[]aCategories?, Default: "javascript"An optional list of categories for the measure
Returns:
objectcurrent measurement containing id, info and start-timestamp (false if error)
jQuery.sap.measure.clear()
Clears all performance measurements
jQuery.sap.measure.clearInteractionMeasurements()
Clears all interaction measurements
Since:
1.34.0
jQuery.sap.measure.clearRequestTimings()
Clears all request timings safely.
Since:
1.34.0
jQuery.sap.measure.end(sId): object
Ends a performance measure
Parameters:
stringsIdID of the measurement
Returns:
objectcurrent measurement containing id, info and start-timestamp, end-timestamp, time, duration (false if error)
jQuery.sap.measure.endInteraction(bForce)
End an interaction measurements
Parameters:
booleanbForceforces end of interaction now and ignores further re-renderings
Since:
1.34.0
jQuery.sap.measure.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(InteractionMeasurement) { return InteractionMeasurement.duration > 0 }
Parameters:
functionfnFiltera filter function that returns true if the passed measurement should be added to the result
Returns:
object[]all interaction measurements passing the filter function successfully
Since:
1.36.2
jQuery.sap.measure.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:
functionfnFilter?a filter function that returns true if the passed measurement should be added to the result
boolean|undefinedbCompleted?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
Returns:
object[] filtered array with measurements containing id, info and start-timestamp, end-timestamp, time, duration, categories (false if error)
Since:
1.34.0
jQuery.sap.measure.getActive(): boolean
Gets the current state of the perfomance measurement functionality
Returns:
booleancurrent state of the perfomance measurement functionality
jQuery.sap.measure.getAllInteractionMeasurements(bFinalize): object[]
Gets all interaction measurements
Parameters:
booleanbFinalizefinalize the current pending interaction so that it is contained in the returned array
Returns:
object[]all interaction measurements
Since:
1.34.0
jQuery.sap.measure.getAllMeasurements(bCompleted?): object[]
Gets all performance measurements
Parameters:
booleanbCompleted?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
jQuery.sap.measure.getMeasurement(sId): object
Gets a performance measure
Parameters:
stringsIdID of the measurement
Returns:
objectcurrent measurement containing id, info and start-timestamp, end-timestamp, time, duration (false if error)
jQuery.sap.measure.getRequestTimings(): object[]
Gets the current request timings array for type 'resource' safely
Returns:
object[]array of performance timing objects
Since:
1.34.0
jQuery.sap.measure.pause(sId): object
Pauses a performance measure
Parameters:
stringsIdID of the measurement
Returns:
objectcurrent measurement containing id, info and start-timestamp, pause-timestamp (false if error)
jQuery.sap.measure.registerMethod(sId, oObject, sMethod, aCategories?): boolean
Registers an average measurement for a given objects method
Parameters:
stringsIdthe id of the measurement
objectoObjectthe object of the method
stringsMethodthe name of the method
string[]aCategories?, Default: ["javascript"]An optional categories list for the measurement
Returns:
booleantrue if the registration was successful
Since:
1.34.0
jQuery.sap.measure.remove(sId)
Removes a performance measure
Parameters:
stringsIdID of the measurement
jQuery.sap.measure.resume(sId): object
Resumes a performance measure
Parameters:
stringsIdID of the measurement
Returns:
objectcurrent measurement containing id, info and start-timestamp, resume-timestamp (false if error)
jQuery.sap.measure.setRequestBufferSize(iSize)
Sets the request buffer size for the measurement safely.
Parameters:
intiSizesize of the buffer
Since:
1.34.0
jQuery.sap.measure.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:
stringsIdID of the measurement
stringsInfoInfo for the measurement
string|string[]aCategories?, Default: "javascript"An optional list of categories for the measure
Returns:
objectcurrent measurement containing id, info and start-timestamp (false if error)
jQuery.sap.measure.startInteraction(sType, oSrcElement)
Start an interaction measurements
Parameters:
stringsTypetype of the event which triggered the interaction
objectoSrcElementthe control on which the interaction was triggered
Since:
1.34.0
jQuery.sap.measure.unregisterAllMethods()
Unregisters all average measurements
Since:
1.34.0
jQuery.sap.measure.unregisterMethod(sId, oObject, sMethod): boolean
Unregisters an average measurement for a given objects method
Parameters:
stringsIdthe id of the measurement
objectoObjectthe object of the method
stringsMethodthe name of the method
Returns:
booleantrue if the unregistration was successful
Since:
1.34.0
setActive(bOn, aCategories): 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:
booleanbOnstate of the perfomance measurement functionality to set
string|string[]aCategoriesAn optional list of categories that should be measured
Returns:
booleancurrent state of the perfomance measurement functionality