You can identify performance issues in your application by tracking the interaction that is performed on the UI.
Interaction in this context means a closed step in a sequence of actions that a user performs on the UI, for example, everything that happens between two clicks on two different buttons.
To start interaction tracking, use the API jQuery.sap.interaction.setActive(true). To map the interaction data to the data of jQuery.sap.measure, you have to explicitely set sap-ui-measure=true.
To retrieve the result of the interaction measurement, use the API jQuery.sap.measure.getAllInteractionMeasurements. This API returns an array of all interactions that occurred and their measurement.
You can use API jQuery.sap.measure.filterInteractionMeasurements to filter the interaction measurements according to a filter function (fnFilter).
#!jsInteractionMeasurement = { event: "click", // event which triggered interaction trigger: "Button1", // control which triggered interaction component: "my.Component", // component or app identifier start : 0, // interaction start end: 0, // interaction end navigation: 0, // sum over all navigation times on the critical path roundtrip: 0, // time from first request sent to last received response end processing: 0, // client processing time duration: 0, // interaction duration requests: [], // Performance API requests during interaction measurements: [], // jQuery.sap.measure measurements sapStatistics: [], // SAP Statistics for OData requestTime: 0, // sum over all requests in the interaction networkTime: 0, // request time minus server time from the header bytesSent: 0, // sum over all requests bytes bytesReceived: 0, // sum over all response bytes requestCompression: false, // true if all responses have been sent gzipped busyIndication: 0 // summed GlobalBusyIndicator duration during this interaction }
Property |
Type |
Description |
---|---|---|
event |
String |
Event type which triggered the interaction. Allowed types are:
|
trigger |
String |
ID of the element that triggered the action |
component |
String |
ID of the app or name of the Component that contains the triggering element |
start |
Number |
Time stamp when interaction was started (in ms) |
end |
Number |
Time stamp when interaction has been finalized (in ms)
Note
This is not always the start time plus the duration. The duration is determined depending on the heuristic determination of the processing time. |
navigation |
Number |
Navigation time for all requests, calculated as difference from startTime to connectEnd of a PerformanceTiming (in ms) Requests that are started while another request is already in progress are ignored (see figure below). |
roundtrip |
Number |
Roundtrip time for a request, calculated as difference from requestStart to responseEnd of a PerformanceTiming (in ms) |
processing |
Number |
JavaScript processing time of an interaction. This is the time consumed when no requests are active. Although we also have JavaScript being processed while asynchronous requests are active, we only consider those to be relevant (in ms) |
duration |
Number |
If a processing time could be determined duration is navigation plus roundtrip plus processing time. Otherwise it is navigation time plus roundtrip time, or end time minutes start time if network requests last longer than the actual interaction (in ms) |
requests |
PerformanceTiming[] |
All requests that occurred during the interaction, taken from the NavigationTiming API |
measurements |
Measurement[] |
Performance measurements (see Performance Measurement Using jQuery.sap.measure) |
sapStatistics |
Object[] |
Map of request URL to corresponding sap-statistics header as String ( format: { url: "https://somehost.com/sap/data...", statistics: "total=167,fw=167,app=0,gwtotal=167,gwhub=160,gwrfcoh=0,gwbe=7,gwapp=0,gwnongw=0" }) |
requestTime |
Number |
Sum over all request durations of this interaction, from startTime to responseEnd (in ms) |
networkTime |
Number |
Average latency of the requests that occurred during the interaction, calculated using the sap-perf-fesrec header that is sent (if available) by the back end with each response (in ms) |
bytesSent |
Number |
Sum over all bytes sent with requests (content plus headers) |
bytesReceived |
Number |
Sum over all bytes received with responses (content plus headers) |
requestCompression |
Boolean |
Indicates if all requests during an interaction have been received in GNU zip format ("gzipped") |
busyDuration |
Number |
Time how long a GlobalBusyIndicator was rendered and hence blocking the UI during an interaction |