Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add uperf throughput-delta-pct stats to detect UDP drops #61

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion uperf-post-process
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ my $result_file = "uperf-client-result.txt";
my %desc = ('source' => 'uperf', 'class' => 'throughput');
(my $rc, my $fh) = open_read_text_file($result_file);
if ($rc == 0 and defined $fh) {
my $ts, my $prev_ts, my $bytes, my $prev_bytes, my $ops, my $prev_ops;;
my $ts, my $prev_ts, my $start_ts, my $bytes, my $prev_bytes, my $ops, my $prev_ops;;
my %names = ();
while (<$fh>) {
if ( $test_type eq "crr") {
Expand Down Expand Up @@ -86,6 +86,16 @@ if ($rc == 0 and defined $fh) {
$prev_ops = $ops;
}
} else {
# Extract % stats from lines Time Data Throughput Operations Errors
# "Difference(%) -0.99% 52.34% 52.81% 52.34% 0.00% "

if ( /^Difference\(%\) \s+(-?\d+\.\d+)% \s+(-?\d+\.\d+)% \s+(-?\d+\.\d+)% \s+(-?\d+\.\d+)% \s+(-?\d+\.\d+)%/ ) {
my $Tput_val = $3;
my %desc = ('source' => 'uperf', 'class' => 'count', 'type' => 'throughput-delta-pct');
my %s = ('begin' => int $start_ts, 'end' => int $ts, 'value' => $Tput_val);
log_sample("0", \%desc, \%names, \%s);
}

if ( /^timestamp_ms:(\d+)\.\d+\s+name:Txn2\s+nr_bytes:(\d+)\s+nr_ops:(\d+)/ ) {
$ts = $1, $bytes = $2, $ops = $3;
if (defined $prev_ts and ((my $ts_diff = ($ts - $prev_ts) / 1000) > 0)) {
Expand All @@ -110,6 +120,8 @@ if ($rc == 0 and defined $fh) {
log_sample("0", \%desc, \%names, \%s);
}
}
} else {
$start_ts = $ts;
}
$prev_ts = $ts;
$prev_bytes = $bytes;
Expand Down
Loading