function handleResponse() {
				if (this.readyState === 4 && this.pendingInteraction) {
					// enrich interaction with information
					var sContentLength = this.getResponseHeader("content-length"),
						bCompressed = this.getResponseHeader("content-encoding") === "gzip",
						sFesrec = this.getResponseHeader("sap-perf-fesrec");
					this.pendingInteraction.bytesReceived += sContentLength ? parseInt(sContentLength, 10) : 0;
					// double string length for byte length as in js characters are stored as 16 bit ints
					this.pendingInteraction.bytesReceived += this.getAllResponseHeaders().length * 2;
					this.pendingInteraction.bytesSent += this.requestHeaderLength || 0;
					// this should be true only if all responses are compressed
					this.pendingInteraction.requestCompression = bCompressed && (this.pendingInteraction.requestCompression !== false);
					// sap-perf-fesrec header contains milliseconds
					this.pendingInteraction.networkTime += sFesrec ? Math.round(parseFloat(sFesrec, 10) / 1000) : 0;
					var sSapStatistics = this.getResponseHeader("sap-statistics");
					if (sSapStatistics) {
						var aTimings = jQuery.sap.measure.getRequestTimings();
						this.pendingInteraction.sapStatistics.push({
							// add response url for mapping purposes
							url: this.responseURL,
							statistics: sSapStatistics,
							timing: aTimings ? aTimings[aTimings.length - 1] : undefined
						});
					}
					delete this.requestHeaderLength;
					delete this.pendingInteraction;
				}
			}
// response handler which uses the custom properties we added to the xhr to retrieve information from the response headers
response handler which uses the custom properties we added to the xhr to retrieve information from the response headers
response handler which uses the custom properties we added to the xhr to retrieve information from the response headers
function handleResponse() {
				if (this.readyState === 4 && this.pendingInteraction) {
					var sContentLength = this.getResponseHeader("content-length"),
						bCompressed = this.getResponseHeader("content-encoding") === "gzip",
						sFesrec = this.getResponseHeader("sap-perf-fesrec");
					this.pendingInteraction.bytesReceived += sContentLength ? parseInt(sContentLength, 10) : 0;
					this.pendingInteraction.bytesReceived += this.getAllResponseHeaders().length * 2;
					this.pendingInteraction.bytesSent += this.requestHeaderLength || 0;
					this.pendingInteraction.requestCompression = bCompressed && (this.pendingInteraction.requestCompression !== false);
					this.pendingInteraction.networkTime += sFesrec ? Math.round(parseFloat(sFesrec, 10) / 1000) : 0;
					var sSapStatistics = this.getResponseHeader("sap-statistics");
					if (sSapStatistics) {
						var aTimings = jQuery.sap.measure.getRequestTimings();
						this.pendingInteraction.sapStatistics.push({
							url: this.responseURL,
							statistics: sSapStatistics,
							timing: aTimings ? aTimings[aTimings.length - 1] : undefined
						});
					}
					delete this.requestHeaderLength;
					delete this.pendingInteraction;
				}
			}
function handleResponse ( ) { if ( this . readyState === 4 && this . pendingInteraction ) { var sContentLength = this . getResponseHeader ( "content-length" ) , bCompressed = this . getResponseHeader ( "content-encoding" ) === "gzip" , sFesrec = this . getResponseHeader ( "sap-perf-fesrec" ) ; this . pendingInteraction . bytesReceived += sContentLength ? parseInt ( sContentLength , 10 ) : 0 ; this . pendingInteraction . bytesReceived += this . getAllResponseHeaders ( ) . length * 2 ; this . pendingInteraction . bytesSent += this . requestHeaderLength || 0 ; this . pendingInteraction . requestCompression = bCompressed && ( this . pendingInteraction . requestCompression !== false ) ; this . pendingInteraction . networkTime += sFesrec ? Math . round ( parseFloat ( sFesrec , 10 ) / 1000 ) : 0 ; var sSapStatistics = this . getResponseHeader ( "sap-statistics" ) ; if ( sSapStatistics ) { var aTimings = jQuery . sap . measure . getRequestTimings ( ) ; this . pendingInteraction . sapStatistics . push ( { url : this . responseURL , statistics : sSapStatistics , timing : aTimings ? aTimings [ aTimings . length - 1 ] : undefined } ) ; } delete this . requestHeaderLength ; delete this . pendingInteraction ; } }
response handler which uses the custom properties we added to the xhr to retrieve information from the response headers
response handler which uses the custom properties we added to the xhr to retrieve information from the response headers
// enrich interaction with information // double string length for byte length as in js characters are stored as 16 bit ints // this should be true only if all responses are compressed // sap-perf-fesrec header contains milliseconds // add response url for mapping purposes