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:
@@ -1,22 +1,22 @@
|
||||
#! /bin/bash
|
||||
|
||||
echo 'Performance: setup'
|
||||
rm -f ./pending.data ./completed.data ./undo.data ./backlog.data perf.rc
|
||||
if [[ -e data/pending.data && -e data/completed.data ]]
|
||||
rm -f ./taskchampion.sqlite3
|
||||
if [[ -e ./data/taskchampion.sqlite3 ]]
|
||||
then
|
||||
echo ' - Using existing data'
|
||||
echo ' - Using existing data.'
|
||||
cp data/* .
|
||||
else
|
||||
echo ' - This step will take several minutes'
|
||||
echo ' - Loading data. This step will take several minutes.'
|
||||
./load
|
||||
mkdir -p data
|
||||
cp *.data perf.rc data
|
||||
cp taskchampion.sqlite3 perf.rc data
|
||||
fi
|
||||
|
||||
# Allow override.
|
||||
if [[ -z $TASK ]]
|
||||
then
|
||||
TASK=../build/src/task
|
||||
TASK=${CMAKE_BINARY_DIR}/src/task
|
||||
fi
|
||||
|
||||
# Run benchmarks.
|
||||
@@ -45,8 +45,8 @@ $TASK rc.debug:1 rc:perf.rc export >/dev/null 2>&1
|
||||
$TASK rc.debug:1 rc:perf.rc export 2>&1 >export.json | grep "Perf task"
|
||||
|
||||
echo ' - task import...'
|
||||
rm -f ./pending.data ./completed.data ./undo.data ./backlog.data
|
||||
$TASK rc.debug:1 rc:perf.rc import export.json 2>&1 | grep "Perf task"
|
||||
rm -f ./taskchampion.sqlite3
|
||||
$TASK rc.debug:1 rc:perf.rc import ${CMAKE_SOURCE_DIR}/performance/export.json 2>&1 | grep "Perf task"
|
||||
|
||||
echo 'End'
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user