Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [03:37 PM]superuser@pipeline[/opt/smokeping/bin] > sudo time /opt/smokeping/bin/smokeping --config=/opt/smokeping/etc/config --logfile=/var/log/smoke.log --debug
- ### Compiling alert detector pattern 'someloss'
- ### >0%,*12*,>0%,*12*,>0%
- sub {
- my $d = shift;
- my $y = $d->{loss};
- for(1){
- my $imax2 = min(@$y - 3, 12);
- my $imax1 = min(@$y - 3, 12);
- my $minlength = 3;
- my $maxlength = 27;
- next if scalar @$y < $minlength ;
- my $i1;
- for($i1=0; $i1 < min($maxlength,$imax1); $i1++){
- my $i2;
- for($i2=0; $i2 < min($maxlength-$i1,$imax2); $i2++){
- next unless defined $y->[-3-$i1-$i2]
- and $y->[-3-$i1-$i2] =~ /^\d/
- and $y->[-3-$i1-$i2] > 0
- ; last;
- }
- return 0 if $i2 >= min($maxlength-$i1-$i2,$imax2);
- next unless defined $y->[-2-$i1]
- and $y->[-2-$i1] =~ /^\d/
- and $y->[-2-$i1] > 0
- ; last;
- }
- return 0 if $i1 >= min($maxlength-$i1,$imax1);
- next unless defined $y->[-1]
- and $y->[-1] =~ /^\d/
- and $y->[-1] > 0
- ; return 1;
- }
- return 0;
- }
- 0.29user 0.07system 1:39.77elapsed 0%CPU (0avgtext+0avgdata 100064maxresident)k
- 0inputs+664outputs (0major+10322minor)pagefaults 0swaps
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement