Skip to content

Commit

Permalink
avoid crash when there's a single dump (TSUN-310)
Browse files Browse the repository at this point in the history
  • Loading branch information
nniclausse committed Sep 29, 2014
1 parent a08a907 commit 0eb0550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tsung_stats.pl.in
Expand Up @@ -481,7 +481,7 @@ sub parse_stats_file {
($time, $data, @tmp) = split(/\s/,$data);
$data /= $interval;
$data = "$time $data @tmp";
} elsif ($key =~ /^size/) { # bits instead of bytes
} elsif ($key =~ /^size/ and $interval) { # bits instead of bytes
my ($time, @tmp) = split(/\s/,$data);
@tmp = map {$_*8/(1024*$interval) } @tmp; # kb/s instead of Bytes/s
$data = "$time @tmp";
Expand Down

0 comments on commit 0eb0550

Please sign in to comment.