Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tkstanczak committed Jul 11, 2019
2 parents 4fd0ea6 + 72ad278 commit a08889f
Show file tree
Hide file tree
Showing 6 changed files with 1,023 additions and 6 deletions.
44 changes: 44 additions & 0 deletions benchmarking/benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
while getopts b:d: option
do
case "${option}"
in
b) branch=${OPTARG};;
d) dbdir=${OPTARG};;
esac
done

startbranch=`git branch | grep \* | cut -d ' ' -f2`

if [ -n "$branch" ]; then
echo "Trying to checkout branch $branch"
git checkout $branch
else
branch=$startbranch
echo "Exeuting on the current branch."
fi

srcdir="../src/Nethermind/Nethermind.PerfTest"
bindir="$srcdir/bin/Release/netcoreapp2.2"
echo "Source $srcdir"
echo "Binaries $bindir"
pushd $srcdir

if [ -n "$dbdir" ]; then
echo "DB dir is $dbdir"
sed -i -e 's|D\:\\chains\\perftest_ropsten|'$dbdir'|g' Program.cs
else
echo "Using default DB dir."
fi

sed -i -e 's|Console.ReadLine();||g' Program.cs

dotnet build -c Release
git checkout -- Program.cs
echo "Trying to checkout branch $startbranch"
git checkout $startbranch
popd
pushd $bindir
dotnet Nethermind.PerfTest.dll
popd

echo "Benchmark for $branch complete"
Loading

0 comments on commit a08889f

Please sign in to comment.