Page 1 of 1

what is the purpose of this loop in AST_VDadapt.pl

PostPosted: Tue Apr 07, 2020 3:27 am
by bobbymc
why does this while loop exist? whats the logic behind it?



while($it < $stat_it)



if ($stat_count < 15)
{
$stat_it = $stat_count;
$stat_B = 1;
}
else
{
$stat_B = ($stat_count - 14);
}

$it=0;
while($it < $stat_it)
{
$it_ary = ($it + $stat_B);
$ready_diff_total[$i] = ($ready_diff_total[$i] + $stat_ready_agents[$i][$it_ary]);
$waiting_diff_total[$i] = ($waiting_diff_total[$i] + $stat_waiting_calls[$i][$it_ary]);
$total_agents_total[$i] = ($total_agents_total[$i] + $stat_total_agents[$i][$it_ary]);
# $event_string="$stat_count $it_ary $stat_total_agents[$i][$it_ary]|$stat_ready_agents[$i][$it_ary]|$stat_waiting_calls[$i][$it_ary]";
# if ($DB) {print " $event_string\n";}
# &event_logger;
$it++;
}



Re: what is the purpose of this loop in AST_VDadapt.pl

PostPosted: Tue Apr 21, 2020 1:22 pm
by williamconley
Looks like it's iterating through servers? But to find out, you'll need to find the origin of $stat_count and what is stored in arrays such as $ready_diff_total[]