Skip to content

Commit a08889f

Browse files
committed
2 parents 4fd0ea6 + 72ad278 commit a08889f

File tree

6 files changed

+1023
-6
lines changed

6 files changed

+1023
-6
lines changed

benchmarking/benchmark.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
while getopts b:d: option
2+
do
3+
case "${option}"
4+
in
5+
b) branch=${OPTARG};;
6+
d) dbdir=${OPTARG};;
7+
esac
8+
done
9+
10+
startbranch=`git branch | grep \* | cut -d ' ' -f2`
11+
12+
if [ -n "$branch" ]; then
13+
echo "Trying to checkout branch $branch"
14+
git checkout $branch
15+
else
16+
branch=$startbranch
17+
echo "Exeuting on the current branch."
18+
fi
19+
20+
srcdir="../src/Nethermind/Nethermind.PerfTest"
21+
bindir="$srcdir/bin/Release/netcoreapp2.2"
22+
echo "Source $srcdir"
23+
echo "Binaries $bindir"
24+
pushd $srcdir
25+
26+
if [ -n "$dbdir" ]; then
27+
echo "DB dir is $dbdir"
28+
sed -i -e 's|D\:\\chains\\perftest_ropsten|'$dbdir'|g' Program.cs
29+
else
30+
echo "Using default DB dir."
31+
fi
32+
33+
sed -i -e 's|Console.ReadLine();||g' Program.cs
34+
35+
dotnet build -c Release
36+
git checkout -- Program.cs
37+
echo "Trying to checkout branch $startbranch"
38+
git checkout $startbranch
39+
popd
40+
pushd $bindir
41+
dotnet Nethermind.PerfTest.dll
42+
popd
43+
44+
echo "Benchmark for $branch complete"

0 commit comments

Comments
 (0)