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.
average(sId, sInfo, aCategories?)Starts an average performance measure.
clear()Clears all performance measurements
clearInteractionMeasurements()Clears all interaction measurements
clearRequestTimings()Clears all request timings safely
end(sId)Ends a performance measure
endInteraction(bForce)End an interaction measurements
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.
getActive()Gets the current state of the perfomance measurement functionality
getAllInteractionMeasurements(bFinalize)Gets all interaction measurements
getAllMeasurements(bCompleted?)Gets all performance measurements
getMeasurement(sId)Gets a performance measure
getRequestTimings()Gets the current request timings array for type 'resource' safely
pause(sId)Pauses a performance measure
registerMethod(sId, oObject, sMethod, aCategories?)Registers an average measurement for a given objects method
remove(sId)Removes a performance measure
resume(sId)Resumes a performance measure
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"
setRequestBufferSize(iSize)Sets the request buffer size for the measurement safely
start(sId, sInfo, aCategories?)Starts a performance measure.
startInteraction(sType, oSrcElement)Start an interaction measurements
unregisterAllMethods()Unregisters all average measurements
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:
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)
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)
clear()
Clears all performance measurements
clearInteractionMeasurements()
Clears all interaction measurements
Since:
1.34.0
clearRequestTimings()
Clears all request timings safely
Since:
1.34.0
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)
endInteraction(bForce)
End an interaction measurements
Parameters:
booleanbForceforces 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:
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
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
getActive(): boolean
Gets the current state of the perfomance measurement functionality
Returns:
booleancurrent state of the perfomance measurement functionality
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
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
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)
getRequestTimings(): object[]
Gets the current request timings array for type 'resource' safely
Returns:
object[]array of performance timing objects
Since:
1.34.0
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)
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
remove(sId)
Removes a performance measure
Parameters:
stringsIdID of the measurement
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)
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:
booleanbOnstate of the perfomance measurement functionality to set
string|string[]Anoptional list of categories that should be measured
Returns:
booleancurrent state of the perfomance measurement functionality
setRequestBufferSize(iSize)
Sets the request buffer size for the measurement safely
Parameters:
intiSizesize 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:
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)
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
unregisterAllMethods()
Unregisters all average measurements
Since:
1.34.0
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