Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions scripts/analysis-benchmark.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/bash
SHA256_ATTEMPTS="16 12 8 6 4 2 1"
FILELIST=~/src/data/filelist.txt
HISTO_ATTEMPTS="16 8 4 2 1"
FILELIST=${FILELIST:-filelist.txt}
PATH=stage/bin:stage/tests:${PATH}
[ ! -e $FILELIST ] && { echo "Please provide a FILELIST"; exit 1; }

DATE=`date +%Y-%m-%d`
HOST=`hostname -s`
FILES=`cat $FILELIST | wc -l`
FILES_SIZE=$(du -cm `cat ~/src/data/filelist.txt` | tail -n 1 | awk '{print $1}')
FILES_SIZE=$(du -cm `cat $FILELIST` | tail -n 1 | awk '{print $1}')
echo "program,processes,time,total file size,number of files,throughput,throughput per process,date,host"

for x in $SHA256_ATTEMPTS; do
T=`(time -p (cat $FILELIST | xargs -P $x -n1 -I{} sha256sum {} >&2)) 2>&1 | grep real | sed -e 's/real //'`
Expand All @@ -13,8 +18,8 @@ for x in $SHA256_ATTEMPTS; do
echo sha256sum,$x,$T,$FILES_SIZE,$FILES,$TP,$TPP,$DATE,$HOST
done

BENCHMARK=stage/bin/o2-analysistutorial-histograms
HISTO_ATTEMPTS="16 8 4 2 1"
BENCHMARK=`which o2-analysistutorial-histograms`
[ "X$BENCHMARK" = X ] && { echo "Unable to find o2-analysistutorial-histograms"; exit 1; }
for x in $HISTO_ATTEMPTS ; do
T=`(time -p $BENCHMARK -b --aod-file @$FILELIST --pipeline eta-and-phi-histograms:1,pt-histogram:1,etaphi-histogram:1 --readers $x > log$x.txt) 2>&1 | grep real | sed -e 's/real //'`
TP=$(bc -l <<< "scale=2; $FILES_SIZE/$T")
Expand All @@ -23,8 +28,8 @@ for x in $HISTO_ATTEMPTS ; do
echo "histo (total),$(($x + 4 )),$T,$FILES_SIZE,$FILES,$TP,$TPP,$DATE,$HOST"
done

BENCHMARK=stage/bin/o2-analysistutorial-histograms
HISTO_ATTEMPTS="16 8 4 2 1"
BENCHMARK=`which o2-analysistutorial-histograms`
[ "X$BENCHMARK" = X ] && { echo "Unable to find o2-analysistutorial-histograms"; exit 1; }
for x in $HISTO_ATTEMPTS ; do
T=`(time -p $BENCHMARK -b --aod-file @$FILELIST --pipeline eta-and-phi-histograms:2,pt-histogram:2,etaphi-histogram:2 --readers $x > log$x.txt) 2>&1 | grep real | sed -e 's/real //'`
TP=$(bc -l <<< "scale=2; $FILES_SIZE/$T")
Expand All @@ -33,10 +38,9 @@ for x in $HISTO_ATTEMPTS ; do
echo "histo with 2 jobs (total),$(($x + 7 )),$T,$FILES_SIZE,$FILES,$TP,$TPP,$DATE,$HOST"
done

BENCHMARK=stage/bin/o2-analysis-vertexing-hf
HISTO_ATTEMPTS="8 4 2 1"
BENCHMARK=`which o2-analysis-vertexing-hf`
[ "X$BENCHMARK" = X ] && { echo "Unable to find o2-analysis-vertexing-hf"; exit 1; }
for x in $HISTO_ATTEMPTS ; do
echo $BENCHMARK -b --aod-file @$FILELIST --pipeline vertexerhf-candidatebuildingDzero:2,vertexerhf-decayvertexbuilder2prong:2 --readers $x > log$x.txt >&2
TP=$(bc -l <<< "scale=2; $FILES_SIZE/$T")
TPP=$(bc -l <<< "scale=2; $FILES_SIZE/$T/$x")
T=`(time -p $BENCHMARK --aod-file @$FILELIST -q --pipeline vertexerhf-candidatebuildingDzero:2,vertexerhf-decayvertexbuilder2prong:2 --readers $x > log$x.txt) 2>&1 | grep real | sed -e 's/real //'`
Expand Down