function calculateAverageQueueLength (inquires) {
    if (!inquires.length)
        return 0;

    const itemsAmount = inquires.length;
    const summaryQueueLength = inquires.reduce((sum, inquiry) => {
        if (!inquiry.queueLength)
            return sum;
        return sum + inquiry.queueLength;
    }, 0);

    return summaryQueueLength / itemsAmount;
}
/**
 * Calculate average queue length of inquiries
 * @param {Array<Inquiry>} inquires
 */
Calculate average queue length of inquiries
@param {Array} inquires
Calculate average queue length of inquiries @param { Array } inquires
function calculateAverageQueueLength (inquires) {
    if (!inquires.length)
        return 0;
    const itemsAmount = inquires.length;
    const summaryQueueLength = inquires.reduce((sum, inquiry) => {
        if (!inquiry.queueLength)
            return sum;
        return sum + inquiry.queueLength;
    }, 0);
    return summaryQueueLength / itemsAmount;
}
function calculateAverageQueueLength ( inquires ) { if ( ! inquires . length ) return 0 ; const itemsAmount = inquires . length ; const summaryQueueLength = inquires . reduce ( ( sum , inquiry ) => { if ( ! inquiry . queueLength ) return sum ; return sum + inquiry . queueLength ; } , 0 ) ; return summaryQueueLength / itemsAmount ; }
Calculate average queue length of inquiries
 @param {Array<Inquiry>} inquires
Calculate average queue length of inquiries @param { Array<Inquiry > } inquires