(latency, errorCode, err, length)
| 193 | } |
| 194 | |
| 195 | _trackResponse(latency, errorCode, err, length) { |
| 196 | // Record metrics |
| 197 | RequestExecution._invokeMetricsHandler(errorCode, this._parent.client.metrics, err, latency); |
| 198 | |
| 199 | // Request tracker |
| 200 | const tracker = this._parent.client.options.requestTracker; |
| 201 | |
| 202 | if (tracker === null) { |
| 203 | return; |
| 204 | } |
| 205 | |
| 206 | // Avoid using instanceof as property check is faster |
| 207 | const query = this._request.query || this._request.queries; |
| 208 | const parameters = this._request.params; |
| 209 | const requestLength = this._request.length; |
| 210 | |
| 211 | if (err) { |
| 212 | tracker.onError(this._host, query, parameters, this._parent.executionOptions, requestLength, err, latency); |
| 213 | } else { |
| 214 | tracker.onSuccess(this._host, query, parameters, this._parent.executionOptions, requestLength, length, latency); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | _getResultSet(response, agreement) { |
| 219 | const rs = new types.ResultSet(response, this._host.address, this._parent.triedHosts, this._parent.speculativeExecutions, |
no test coverage detected