Skip to content

Commit c3ea38a

Browse files
tc-wilsonportante
authored andcommitted
reformat fio-postprocess to use if/elsif instead of switch
1 parent a7e64a0 commit c3ea38a

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

agent/bench-scripts/postprocess/fio-postprocess

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -235,22 +235,19 @@ foreach $client_hostname_dir (@client_hostname_dirs) {
235235
my @samples;
236236
my $description_label;
237237
my $this_metric;
238-
if ($log_type eq "iops") {
239-
$description_label = "Number of I/O operations sent by client for a period of 1 second";
240-
$this_metric = \@iops_sec;
241-
}
242-
elsif ($log_type eq "lat") {
243-
$description_label = "Average total latency per I/O operation";
244-
$this_metric = \@lat;
245-
}
246-
elsif ($log_type eq "clat") {
247-
$description_label = "Average completion latency per I/O operation";
248-
$this_metric = \@clat;
249-
}
250-
elsif ($log_type eq "slat") {
251-
$description_label = "Average submission latency per I/O operation";
252-
$this_metric = \@slat;
253-
}
238+
if ($log_type eq "iops") {
239+
$description_label = "Number of I/O operations sent by client for a period of 1 second";
240+
$this_metric = \@iops_sec;
241+
} elsif ($log_type eq "lat") {
242+
$description_label = "Average total latency per I/O operation";
243+
$this_metric = \@lat;
244+
} elsif ($log_type eq "clat") {
245+
$description_label = "Average completion latency per I/O operation";
246+
$this_metric = \@clat;
247+
} elsif ($log_type eq "slat") {
248+
$description_label = "Average submission latency per I/O operation";
249+
$this_metric = \@slat;
250+
}
254251
open(IN_FILE, "$dir/clients/$client_hostname_dir/$log_file") || die "$script: could not open file $dir/clients/$client_hostname_dir/$log_file $!\n";
255252
while (<IN_FILE>) {
256253
$line = "$_";

0 commit comments

Comments
 (0)