Updated and renamed the buildRT and benchmarkRT scripts.
This commit is contained in:
parent
d2980caba5
commit
d64d48c6f8
@ -21,59 +21,59 @@ howto() {
|
|||||||
fold -s <<END
|
fold -s <<END
|
||||||
Benchmark the time it takes for a given version of RawTherapee to process a file. The designated file will be processed three times in a row, and the average time of those three runs will be calculated. Make sure you have no unnecessary background activity - no programs intensely using the CPU. Turn off all P2P, multimedia, graphics editing, games, database, server and other "heavy" software, otherwise the timings will be skewed. You can use the "top" and "ps ux" commands to see a list of running processes and their CPU usage.
|
Benchmark the time it takes for a given version of RawTherapee to process a file. The designated file will be processed three times in a row, and the average time of those three runs will be calculated. Make sure you have no unnecessary background activity - no programs intensely using the CPU. Turn off all P2P, multimedia, graphics editing, games, database, server and other "heavy" software, otherwise the timings will be skewed. You can use the "top" and "ps ux" commands to see a list of running processes and their CPU usage.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
./benchmark_rt.sh [OPTIONS]
|
./benchmarkRT [OPTIONS]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-b <type> - Specify the CMAKE_BUILD_TYPE.
|
-b <type> - Specify the CMAKE_BUILD_TYPE.
|
||||||
The default value is "release".
|
The default value is "release".
|
||||||
|
|
||||||
Valid types are:
|
Valid types are:
|
||||||
release
|
release
|
||||||
debug
|
debug
|
||||||
minsizerel
|
minsizerel
|
||||||
relwithdebuginfo
|
relwithdebuginfo
|
||||||
|
|
||||||
-e - Specify the whole path to (but excluding) the "rawtherapee"
|
-e - Specify the whole path to (but excluding) the "rawtherapee"
|
||||||
executable.
|
executable.
|
||||||
e.g. "-e $HOME/rt_${branch}_${buildType}"
|
e.g. "-e $HOME/rt_${branch}_${buildType}"
|
||||||
|
|
||||||
-h - Print this help screen.
|
-h - Print this help screen.
|
||||||
|
|
||||||
-i <file> - Input file name. This can be a file on your hard drive or a url.
|
-i <file> - Input file name. This can be a file on your hard drive or a url.
|
||||||
The url must start with "http". The default behavior if you do
|
The url must start with "http". The default behavior if you do
|
||||||
not use -i is to download a test file from www.rawtherapee.com
|
not use -i is to download a test file from www.rawtherapee.com
|
||||||
|
|
||||||
-m <path> - Path to your clone of the RawTherapee source code repository.
|
-m <path> - Path to your clone of the RawTherapee source code repository.
|
||||||
The default path is ~/rawtherapee
|
The default path is ~/rawtherapee
|
||||||
If you do not specify a path and ~/rawtherapee is not found, it
|
If you do not specify a path and ~/rawtherapee is not found, it
|
||||||
will be cloned.
|
will be cloned.
|
||||||
|
|
||||||
-r <rev> - You can try out any revision of RawTherapee.
|
-r <rev> - You can try out any revision of RawTherapee.
|
||||||
|
|
||||||
Valid values are digits or the word "tip" (excluding quotation
|
Valid values are digits or the word "tip" (excluding quotation
|
||||||
marks), e.g.
|
marks), e.g.
|
||||||
1234
|
1234
|
||||||
tip
|
tip
|
||||||
|
|
||||||
-s <file> - Input sidecar file name. The name of the PP3 or XMP file by
|
-s <file> - Input sidecar file name. The name of the PP3 or XMP file by
|
||||||
which the input file must be developed.
|
which the input file must be developed.
|
||||||
This can be a file on your hard drive or a url.
|
This can be a file on your hard drive or a url.
|
||||||
The default behaviour if you do not use -s is to use the
|
The default behaviour if you do not use -s is to use the
|
||||||
"neutral" profile.
|
"neutral" profile.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
Run the default benchmark (recommended)
|
Run the default benchmark (recommended)
|
||||||
./benchmark_rt.sh
|
./benchmarkRT
|
||||||
|
|
||||||
Run a benchmark using your own files and existing RT clone dir
|
Run a benchmark using your own files and existing RT clone dir
|
||||||
./benchmark_rt.sh -b release -i kittens.raw -s kittens.raw.pp3 -m /home/fruitloops/rawtherapee-clone -r 4.0.0
|
./benchmarkRT -b release -i kittens.raw -s kittens.raw.pp3 -m /home/fruitloops/rawtherapee-clone -r 4.0.0
|
||||||
|
|
||||||
Further help:
|
Further help:
|
||||||
If you need further help, discover bugs or want to request new functionality
|
If you need further help, discover bugs or want to request new functionality
|
||||||
in this script, then tell us in the forum or on IRC:
|
in this script, then tell us in the forum or on IRC:
|
||||||
http://rawtherapee.com/forum/
|
http://rawtherapee.com/forum/
|
||||||
http://webchat.freenode.net/?randomnick=1&channels=rawtherapee&prompt=1
|
http://webchat.freenode.net/?randomnick=1&channels=rawtherapee&prompt=1
|
||||||
|
|
||||||
END
|
END
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Written by DrSlony
|
# Written by DrSlony
|
||||||
# Version 2.0, 2012-02-10
|
# Version 2.0.1, 2012-02-15
|
||||||
# Please report bugs or enhancements to http://code.google.com/p/rawtherapee/issues/list
|
# Please report bugs or enhancements to http://code.google.com/p/rawtherapee/issues/list
|
||||||
# www.seeitmyway.org
|
# www.seeitmyway.org
|
||||||
# www.rawtherapee.com
|
# www.rawtherapee.com
|
||||||
@ -75,6 +75,7 @@ compile () {
|
|||||||
|
|
||||||
# if you manually applied a patch, this check avoids having it undone or broken by a hg update
|
# if you manually applied a patch, this check avoids having it undone or broken by a hg update
|
||||||
if [[ ! $patched = b ]]; then
|
if [[ ! $patched = b ]]; then
|
||||||
|
printf "%s\n" "\$patched is ${patched}"
|
||||||
printf "%s\n" "Updating the local repository."
|
printf "%s\n" "Updating the local repository."
|
||||||
hg pull
|
hg pull
|
||||||
hg update ${branch}
|
hg update ${branch}
|
||||||
@ -86,29 +87,11 @@ compile () {
|
|||||||
verLatesttag="`hg parents --template '{latesttag}'`"
|
verLatesttag="`hg parents --template '{latesttag}'`"
|
||||||
verLatesttagdistance="`hg parents --template '{latesttagdistance}'`"
|
verLatesttagdistance="`hg parents --template '{latesttagdistance}'`"
|
||||||
verMajor=${verLatesttag%%.*}
|
verMajor=${verLatesttag%%.*}
|
||||||
cmake -DCMAKE_BUILD_TYPE=${buildType} -DPROC_TARGET_NUMBER:STRING=${procTarget} -DCMAKE_C_FLAGS="-O3 -pipe" -DCMAKE_CXX_FLAGS="${CMAKE_C_FLAGS}" ${noomp} -DCMAKE_INSTALL_PREFIX=rawtherapee -DBUILD_BUNDLE=ON -DBINDIR=. -DDATADIR=. -DCACHE_NAME_SUFFIX=${verMajor} || { echo "Error during cmake, exiting." >&2; exit 1; }
|
cmake -DCMAKE_BUILD_TYPE="$buildType" -DPROC_TARGET_NUMBER="$procTarget" -DCMAKE_C_FLAGS="-O2 -pipe" -DCMAKE_CXX_FLAGS="$CMAKE_C_FLAGS" -DCMAKE_CXX_FLAGS_RELEASE="$CMAKE_CXX_FLAGS" "$noomp" -DCMAKE_INSTALL_PREFIX="rawtherapee" -DBUILD_BUNDLE="ON" -DBINDIR="." -DDATADIR="." -DCACHE_NAME_SUFFIX="$verMajor" || { echo "Error during cmake, exiting." >&2; exit 1; }
|
||||||
time { make -j${cpuCount} install; } || { printf "%s\n" "" "Error during make, exiting."; exit 1; }
|
time { make -j${cpuCount} install; } || { printf "%s\n" "" "Error during make, exiting."; exit 1; }
|
||||||
printf "%-15b %b\n" "" "" "Rawtherapee compiled:" "" "\tChoice number:" "$choiceNumber" "\tBranch:" "$branch" "\tBuild type:" "$buildType" "\tTarget:" "$procTarget" "" ""
|
printf "%-15b %b\n" "" "" "Rawtherapee compiled:" "" "\tChoice number:" "$choiceNumber" "\tBranch:" "$branch" "\tBuild type:" "$buildType" "\tTarget:" "$procTarget" "" ""
|
||||||
|
|
||||||
# # branch "branch_3.0" will compile into a dir called "rawtherapee", good, no action needed.
|
[[ -d "${repo}/${buildType}" ]] && { printf "%s\n" "Moving \"${repo}/${buildType}\" to \"${repo}/rawtherapee\""; mv "${repo}/${buildType}" "${repo}/rawtherapee"; } || { printf "%s\n" "Could not find the directory containing the compiled RawTherapee in ${repo}" "Please notify DrSlony in the forum:" "http://rawtherapee.com/forum/viewtopic.php?f=10&t=3001#p22213" "" "Exiting"; exit 1; }
|
||||||
# # branch "default" with "-DCMAKE_BUILD_TYPE=release" will compile into a dir called "release", rename to "rawtherapee"
|
|
||||||
# # branch "default" with "-DCMAKE_BUILD_TYPE=debug" will compile into a dir called "debug", rename to "rawtherapee"
|
|
||||||
# # 2012-12-28 compilng branch_3.0 fails, probably due to a requirement on outdated dependencies, and I will remove this section once RT4 goes officially stable
|
|
||||||
# if [[ -d "$repo/release" ]]
|
|
||||||
# then
|
|
||||||
# echo "Found $repo/release, moving to ${repo}/rawtherapee"
|
|
||||||
# mv -v "${repo}/release" "${repo}/rawtherapee" || { echo "Something went wrong while moving ${repo}/release to ${repo}/rawtherapee" >&2; exit 1; }
|
|
||||||
# elif [[ -d "$repo/debug" ]]
|
|
||||||
# then
|
|
||||||
# echo "Found $repo/debug, moving to ${repo}/rawtherapee"
|
|
||||||
# mv -v "${repo}/debug" "${repo}/rawtherapee" || { echo "Something went wrong while moving ${repo}/debug to ${repo}/rawtherapee" >&2; exit 1; }
|
|
||||||
# elif [[ -d "$repo/minsizerel" ]]
|
|
||||||
# then
|
|
||||||
# echo "Found $repo/minsizerel, moving to ${repo}/rawtherapee"
|
|
||||||
# mv -v "${repo}/minsizerel" "${repo}/rawtherapee" || { echo "Something went wrong while moving ${repo}/minsizerel to ${repo}/rawtherapee" >&2; exit 1; }
|
|
||||||
# fi
|
|
||||||
|
|
||||||
[[ -d "${repo}/${buildType}" ]] && { printf "%s\n" "Moving ${repo}/${buildType} to ${repo}/rawtherapee"; mv "${repo}/${buildType}" "${repo}/rawtherapee"; } || { printf "%s\n" "Could not find the directory containing the compiled RawTherapee in ${repo}" "Please notify DrSlony in the forum:" "http://rawtherapee.com/forum/viewtopic.php?f=10&t=3001#p22213" "" "Exiting"; exit 1; }
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
cat AboutThisBuild.txt || { printf "%s\n" "${repo}/AboutThisBuild.txt not found, exiting."; exit 1; }
|
cat AboutThisBuild.txt || { printf "%s\n" "${repo}/AboutThisBuild.txt not found, exiting."; exit 1; }
|
||||||
@ -124,7 +107,7 @@ compile () {
|
|||||||
mv "${repo}/rawtherapee" "${HOME}/rt_${branch}_${buildType}" || { printf "%s\n" "" "Could not move \"${repo}/rawtherapee\" to \"${HOME}/rt_${branch}_${buildType}\", exiting."; exit 1; }
|
mv "${repo}/rawtherapee" "${HOME}/rt_${branch}_${buildType}" || { printf "%s\n" "" "Could not move \"${repo}/rawtherapee\" to \"${HOME}/rt_${branch}_${buildType}\", exiting."; exit 1; }
|
||||||
|
|
||||||
printf "%-15b %b\n" "" "" "Build ready:" "" "\tChoice number:" "$choiceNumber" "\tBranch:" "$branch" "\tBuild type:" "$buildType" "\tTarget:" "$procTarget"
|
printf "%-15b %b\n" "" "" "Build ready:" "" "\tChoice number:" "$choiceNumber" "\tBranch:" "$branch" "\tBuild type:" "$buildType" "\tTarget:" "$procTarget"
|
||||||
printf "%s\n" "" "To run RawTherapee, fire up a terminal and type:" "~/rt_${branch}_${buildType}/rawtherapee" "" "------------------------------------------" ""
|
printf "%s\n" "" "To run RawTherapee, fire up a terminal and type:" "~/rt_${branch}_${buildType}/rawtherapee" "" "------------------------------------------"
|
||||||
alert "RawTherapee-${verLatesttag}.${verLatesttagdistance} ready.\nChoice number ${choiceNumber}, branch: ${branch}, type: ${buildType}, target: ${procTarget}"
|
alert "RawTherapee-${verLatesttag}.${verLatesttagdistance} ready.\nChoice number ${choiceNumber}, branch: ${branch}, type: ${buildType}, target: ${procTarget}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -207,7 +190,7 @@ checkBits () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setVars () {
|
setVars () {
|
||||||
unset choiceNumber choiceNumbers buildType buildTypes list branch branches repo patched param
|
unset choiceNumber choiceNumbers buildType buildTypes list branch branches repo param
|
||||||
checkDistro
|
checkDistro
|
||||||
checkBits
|
checkBits
|
||||||
repo="${HOME}/rawtherapee" && echo "Repository is set to ${repo}"
|
repo="${HOME}/rawtherapee" && echo "Repository is set to ${repo}"
|
||||||
@ -236,7 +219,7 @@ alert () {
|
|||||||
finishUp () {
|
finishUp () {
|
||||||
# builds=( /tmp/RawTherapee* ); for f in ${builds[@]}; do echo ${f#/tmp/}; done
|
# builds=( /tmp/RawTherapee* ); for f in ${builds[@]}; do echo ${f#/tmp/}; done
|
||||||
if [[ $patched != b ]]; then
|
if [[ $patched != b ]]; then
|
||||||
printf "%s\n" "RawTherapee zipped builds read in /tmp"
|
printf "%s\n" "RawTherapee zipped builds ready in /tmp"
|
||||||
ls -lh /tmp/RawTherapee*
|
ls -lh /tmp/RawTherapee*
|
||||||
fi
|
fi
|
||||||
printf "%s\n" "" "Finished building all chosen versions of RawTherapee"
|
printf "%s\n" "" "Finished building all chosen versions of RawTherapee"
|
Loading…
x
Reference in New Issue
Block a user