function constructLogObject(qStats) {
  const queueStats = {};

  queueStats.jobCount = qStats.jobCount;
  queueStats.recordCount = qStats.recordCount;
  const queueTimeArray = stringToArray(qStats.queueTimeArray);
  queueStats.timestamp = qStats.timestamp;

  // Calculate stats based on queue timings
  const stats = calculateStats(queueTimeArray);

  queueStats.medianQueueTimeMillis = stats.medianQueueTimeMillis;
  queueStats.averageQueueTimeMillis = stats.averageQueueTimeMillis;
  queueStats.queueTime95thMillis = stats.queueTime95thMillis;

  return queueStats;
}
/**
 * Construct log object
 *
 * @param {object} qStats - queue time object from redis
 * @returns {object} queueStats - queue time stats log object
 */
Construct log object
@param {object} qStats - queue time object from redis
@returns {object} queueStats - queue time stats log object
Construct log object @param { object } qStats - queue time object from redis @returns { object } queueStats - queue time stats log object
function constructLogObject(qStats) {
  const queueStats = {};
  queueStats.jobCount = qStats.jobCount;
  queueStats.recordCount = qStats.recordCount;
  const queueTimeArray = stringToArray(qStats.queueTimeArray);
  queueStats.timestamp = qStats.timestamp;
  const stats = calculateStats(queueTimeArray);
  queueStats.medianQueueTimeMillis = stats.medianQueueTimeMillis;
  queueStats.averageQueueTimeMillis = stats.averageQueueTimeMillis;
  queueStats.queueTime95thMillis = stats.queueTime95thMillis;
  return queueStats;
}
function constructLogObject ( qStats ) { const queueStats = { } ; queueStats . jobCount = qStats . jobCount ; queueStats . recordCount = qStats . recordCount ; const queueTimeArray = stringToArray ( qStats . queueTimeArray ) ; queueStats . timestamp = qStats . timestamp ; const stats = calculateStats ( queueTimeArray ) ; queueStats . medianQueueTimeMillis = stats . medianQueueTimeMillis ; queueStats . averageQueueTimeMillis = stats . averageQueueTimeMillis ; queueStats . queueTime95thMillis = stats . queueTime95thMillis ; return queueStats ; }
Construct log object
 @param {object} qStats - queue time object from redis
 @returns {object} queueStats - queue time stats log object
Construct log object @param { object } qStats - queue time object from redis @returns { object } queueStats - queue time stats log object
// Calculate stats based on queue timings