Skip to content

Commit

Permalink
Fix for xml filter script
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTheBear committed Dec 3, 2021
1 parent 57ccada commit a079083
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions filters/xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ if (! -e $filename)
{
die "Input file does not exist!\n";
}

open INFILE,"<$filename";
$filename =~ s/\.tmp/\.$FILTERTYPE/;
$filename =~ s/\.$FILTERTYPE\.$FILTERTYPE/\.$FILTERTYPE/;
open OUTFILE,">$filename";


Expand Down Expand Up @@ -188,7 +188,7 @@ if ($fileType eq 'topology') {

for (my $i=0; $i<@cpus; $i++) {

print OUTFILE '<cpu'.$cpus[$i].'>'.$col[2+$i].'</cpu'.$cpus[$i].'>'.$NL;
print OUTFILE '<hwthread'.$cpus[$i].'>'.$col[2+$i].'</hwthread'.$cpus[$i].'>'.$NL;
}
print OUTFILE '</event>'.$NL;
}
Expand All @@ -211,7 +211,7 @@ if ($fileType eq 'topology') {
print OUTFILE '<unit>'.$unit.'</unit>'.$NL;
}
for (my $i=0; $i<@cpus; $i++) {
print OUTFILE '<cpu'.$cpus[$i].'>'.$col[1+$i].'</cpu'.$cpus[$i].'>'.$NL;
print OUTFILE '<hwthread'.$cpus[$i].'>'.$col[1+$i].'</hwthread'.$cpus[$i].'>'.$NL;
}
print OUTFILE '</metric>'.$NL;
}
Expand Down

0 comments on commit a079083

Please sign in to comment.