Ninety-Fifth Percentile Calculation for Bandwidth
- by Kyle Brandt
I am trying to calculate the bandwidth of my current internet connection. I am pulling the current input and output transfer rate via snmp. If the argument to the following function is a sorted ascending list of the the some of each input and output sample, is this the right way to calculate 95th percentile?
sub ninetyFifth {
#Expects Sorted Data
my $ninetyFifthLine = (@_ * .95) - 1;
return $_[$ninetyFifthLine];
}