MCPcopy Create free account
hub / github.com/scality/cloudserver / getBytesSent

Function getBytesSent

lib/utilities/serverAccessLogger.js:418–433  ·  view source on GitHub ↗
(res, bytesSent)

Source from the content-addressed store, hash-verified

416}
417
418function getBytesSent(res, bytesSent) {
419 if (bytesSent !== undefined && bytesSent !== null) {
420 return bytesSent;
421 }
422
423 if (!res) {
424 return null;
425 }
426
427 const len = res.getHeader('Content-Length');
428 if (len === undefined || len === null) {
429 return null;
430 }
431
432 return len;
433}
434
435function calculateTotalTime(startTime, onFinishEndTime) {
436 if (startTime === undefined || startTime === null || onFinishEndTime === undefined || onFinishEndTime === null) {

Callers 2

logServerAccessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected