MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / getPayloadSizes

Function getPayloadSizes

lib/tracker/request-logger.js:284–290  ·  view source on GitHub ↗
(requestLength, responseLength)

Source from the content-addressed store, hash-verified

282}
283
284function getPayloadSizes(requestLength, responseLength) {
285 let message = 'request size ' + formatSize(requestLength);
286 if (responseLength !== undefined) {
287 message += ' / response size ' + formatSize(responseLength);
288 }
289 return message;
290}
291
292function formatSize(length) {
293 return length > 1000 ? Math.round(length / 1024) + ' KB' : length + ' bytes';

Callers 5

_logSlowMethod · 0.85
_logLargeRequestMethod · 0.85
_logNormalRequestMethod · 0.85
_logLargeErrorRequestMethod · 0.85
_logErrorRequestMethod · 0.85

Calls 1

formatSizeFunction · 0.85

Tested by

no test coverage detected