Update performance scripts (#3532)

* update performance script to work with out-of-source build
* update displayed messages and remove perf.rc file
* remove .gitignore in performance folder
This commit is contained in:
Felix Schurk 2024-07-04 08:45:42 +02:00 committed by GitHub
parent eb22036f6b
commit 85f52e3630
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 20 deletions

View file

@ -14,7 +14,7 @@ if (open my $fh, '>', 'perf.rc')
close $fh;
}
my $filename = 'sample-text.txt';
my $filename = '${CMAKE_SOURCE_DIR}/performance/sample-text.txt';
open(my $fh, '<:encoding(UTF-8)', $filename)
or die "Could not open file '$filename' $!";
@ -31,18 +31,18 @@ while (my $line = <$fh>)
if ($. % 20 == 19)
{
my $anno_id = $id - 1;
qx{../build/src/task rc:perf.rc rc.gc=off $anno_id annotate $line};
qx{${CMAKE_BINARY_DIR}/src/task rc:perf.rc rc.gc=off $anno_id annotate $line};
print "[$.] task rc:perf.rc rc.gc=off $anno_id annotate $line\n" if $?;
}
elsif ($. % 4 == 1)
{
qx{../build/src/task rc:perf.rc rc.gc=off add $line};
qx{${CMAKE_BINARY_DIR}/src/task rc:perf.rc rc.gc=off add $line};
print "[$.] task rc:perf.rc rc.gc=off add $line\n" if $?;
++$id;
}
else
{
qx{../build/src/task rc:perf.rc rc.gc=off log $line};
qx{${CMAKE_BINARY_DIR}/src/task rc:perf.rc rc.gc=off log $line};
print "[$.] task rc:perf.rc rc.gc=off log $line\n" if $?;
}
}