Skip to content

Commit

Permalink
Tolerate additional fields in netlink and perform udpbench parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluhm committed Jan 25, 2024
1 parent e29b4e7 commit 0c48412
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions netlink.pl
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ sub tcpbench_finalize {

sub udpbench_parser {
my ($line, $log) = @_;
if ($line =~ m{^(send|recv): .*, bit/s ([\d.e+]+)$}) {
if ($line =~ m{^(send|recv): .*, bit/s ([\d.e+]+)\b}) {
my $direction = $1;
my $value = 0 + $2;
print $tr "VALUE $value bits/sec $direction\n";
Expand All @@ -770,7 +770,7 @@ sub udpbench_parser {

sub netbench_parser {
my ($line, $log) = @_;
if ($line =~ m{^(send|recv)all:.* bit/s ([\d.e+]+)$}) {
if ($line =~ m{^(send|recv)all:.* bit/s ([\d.e+]+)\b}) {
my $direction = $1;
my $value = 0 + $2;
print $tr "VALUE $value bits/sec $direction\n";
Expand Down
4 changes: 2 additions & 2 deletions perform.pl
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ sub tcpbench_finalize {

sub udpbench_parser {
my ($line, $log) = @_;
if ($line =~ m{^(send|recv): .*, bit/s ([\d.e+]+)$}) {
if ($line =~ m{^(send|recv): .*, bit/s ([\d.e+]+)\b}) {
my $direction = $1;
my $value = 0 + $2;
print $tr "VALUE $value bits/sec $direction\n";
Expand All @@ -430,7 +430,7 @@ sub udpbench_parser {

sub netbench_parser {
my ($line, $log) = @_;
if ($line =~ m{^(send|recv)all:.* bit/s ([\d.e+]+)$}) {
if ($line =~ m{^(send|recv)all:.* bit/s ([\d.e+]+)\b}) {
my $direction = $1;
my $value = 0 + $2;
print $tr "VALUE $value bits/sec $direction\n";
Expand Down

0 comments on commit 0c48412

Please sign in to comment.