Skip to content

Commit 4273ae1

Browse files
k-risterportante
authored andcommitted
process-iteration-samples: ensure strings are being compared
- The Perl ne operator is a stringwise comparison of the left and right arguments. If the values in the left and right arguments are not strings then this can cause an "Operation "ne": no method found" error. - This was occuring when iterating through parameters stored from pbench-trafficgen.
1 parent 11b6187 commit 4273ae1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

agent/bench-scripts/postprocess/process-iteration-samples

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ foreach $sample (@json_samples) { # samples 0..N
236236
if ( $key ne get_label('timeseries_label') and $key ne get_label('uid_label') ) { # timeseries already handled above
237237
if ($iteration{$metric_type}{$metric_name}[$iteration_matching_index]{$key}) {
238238
my $iteration_value = $iteration{$metric_type}{$metric_name}[$iteration_matching_index]{$key};
239-
if ($sample_value ne $iteration_value) {
239+
if ("$sample_value" ne "$iteration_value") {
240240
print "Error: values do not match\nkey: $key values: $iteration_value $sample_value\n";
241241
}
242242
} else {

0 commit comments

Comments
 (0)