Commit 42483144 authored by Olav Kvittem's avatar Olav Kvittem
Browse files

bug h_min_d min delay last 1000 packets was minimum of all sources..

parent ef2f21f3
......@@ -19,7 +19,7 @@ use constant JAN_1970 => 0x83aa7e80;
# use LWP::Protocol::https;
# date --date 'jan 1 2000' +%s
$version="0.9.7";
$version="0.9.8";
$min_tx=946681200;
$max_tx=1893452400; # 2030-01-01
$maxseqreorder=1000; #
......@@ -37,7 +37,6 @@ my $min_slope=0.2;
my $jitter_period=60; # seconds between jitter reports
my %jitter_last=();
require "newgetopt.pl";
$usage="$0 '[-title text] [-minloss n] [-win n] [-graph file] [max-small-graphs n] [-outdir dir] [-head|-rhead] [-id id] [-names file] [-json file] [-v] [-version] [-esmond url] [file]...
Analyse gaps in a crude packet log
- output a list of statistical qos parameters as text or json
......@@ -492,7 +491,7 @@ sub analyze_packet {
}
} else { # normal packet
if ( ( $opt_jitter && $n_normal{$id}++ % $maxhead ) == 0 ){ # jitter check
if ( $opt_jitter && ( $n_normal{$id}++ % $maxhead ) == 0 ){ # jitter check
check_jitter($id);
}
......@@ -756,7 +755,7 @@ sub report_delay{ # jitter for one delay
# my @l=@$refl;
my $ptx=0, $prx=0, $sumjit=0, $njit=0, $ndelay=0, $sumdd=0, $sumdelay=0;
my $start=$#$refl-$maxhead;
my $mindelay, $tail_delay;
my $mindelay, $taildelay;
my @rdelay=(), @rtx=(), $tx0=0;
my @rrx=(), $rx0=0;
my $rudeid, $seq, $src, $dst, $tx, $rx, $size, $pseq;
......@@ -804,14 +803,14 @@ sub report_delay{ # jitter for one delay
$pdelay=$delay;
$pseq=$seq;
}
}
}
for ($i=0; $i<=$#rdelay; $i++){ # relative delay in ms
$rdelay[$i]=($rdelay[$i]-$mindelay)*1000;
}
}
for ($i=0; $i<=$#rdelay; $i++){ # relative delay in ms
$rdelay[$i]=($rdelay[$i]-$mindelay)*1000;
}
$sumdd=$sumdd-$njit*$mindelay; # sum differences from minimum
$sumdd=$sumdd-$njit*$mindelay; # sum differences from minimum
if($njit> 0 && $ndelay > 0){
$lineFit = Statistics::LineFit->new();
......@@ -896,7 +895,8 @@ sub report_delay{ # jitter for one delay
while ($#slope < ($min_slopes-1)){ push(@slope, "-"); }
$slopes=join(' ', @slope);
return sprintf "%3d %9.3f %9.3f %9.3f %9.3f %s", $njit, $sumjit/$njit*1000, $sumdd/$njit*1000, $sumdelay/$ndelay*1000, $taildelay*1000, $slopes;
return sprintf "%3d %9.3f %9.3f %9.3f %9.3f %s", $njit, $sumjit/$njit*1000, $sumdd/$njit*1000,
$sumdelay/$ndelay*1000, $taildelay*1000, $slopes;
} else {
return sprintf "%3d %5.3f %5.3f", 0, 0, 0;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment