mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
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:
parent
eb22036f6b
commit
85f52e3630
5 changed files with 22 additions and 20 deletions
|
@ -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 $?;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue