Commit 6b36e8c2 authored by Olav Kvittem's avatar Olav Kvittem

bug jitter for 1000 heller en 50

parent a9d86dd8
Pipeline #15900 passed with stages
in 1 minute and 5 seconds
......@@ -8,7 +8,7 @@ apt-get update
apt-get -y upgrade
package="mp-rude"
version="1.3.13"
version="1.3.14"
target="${package}_${version}_all"
......
......@@ -19,7 +19,7 @@ use constant JAN_1970 => 0x83aa7e80;
# use LWP::Protocol::https;
# date --date 'jan 1 2000' +%s
$version="0.9.9";
$version="0.1.0";
$min_tx=946681200;
$max_tx=1893452400; # 2030-01-01
$maxseqreorder=1000; #
......@@ -40,6 +40,8 @@ my $min_slope=0.2;
my $jitter_period=60; # seconds between jitter reports
my %jitter_last=();
my %mindelay; # minimum delay last slep
$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
......@@ -781,18 +783,21 @@ 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, $taildelay;
my $taildelay; # in tail/head
my @rdelay=(), @rtx=(), $tx0=0;
my @rrx=(), $rx0=0;
my $rudeid, $seq, $src, $dst, $tx, $rx, $size, $pseq;
foreach $i( 0 .. ($#$$refl - 0) ){ # skip the last one which might be after the gap
foreach $i( $start .. ($#$$refl - 0) ){ # skip the last one which might be after the gap
my $rline=\@$$refl[$i];
if ( ( ($rudeid, $seq, $src, $dst, $tx, $rx, $size)=
$$rline =~ /ID=(\d+)\s+SEQ=(\d+)\s+SRC=([\d.:]+)\s+DST=([\d.:]+)\s+Tx=([\d.,]+)\s+Rx=([\d.,]+).+SIZE=(\d+)/)
|| ( ($seq, $src, $tx, $rx) = $$rline =~ /$bv_fmt/ )
){
$delay=$rx-$tx;
$mindelay = $delay if !$mindelay || $delay < $mindelay;
if ( !$mindelay{$id} || $delay < $mindelay{$id} || $minseq+$maxslep < $seq){ # minimum for slep
$mindelay{$id} = $delay;
$minseq = $seq;
}
if ( !$taildelay || $delay < $taildelay){
$taildelay = $delay;
}
......@@ -805,6 +810,7 @@ sub report_delay{ # jitter for one delay
$txgap=shift( @{$txgap{$id}} );
}
}
$sumdelay+=$delay;
$ndelay++;
......
Markdown is supported
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