Skip to content

Commit 0527460

Browse files
authored
Analysis Benchmark fixes (#3611)
1 parent 8069159 commit 0527460

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

scripts/analysis-benchmark.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/bin/bash
22
SHA256_ATTEMPTS="16 12 8 6 4 2 1"
3-
FILELIST=~/src/data/filelist.txt
3+
HISTO_ATTEMPTS="16 8 4 2 1"
4+
FILELIST=${FILELIST:-filelist.txt}
5+
PATH=stage/bin:stage/tests:${PATH}
6+
[ ! -e $FILELIST ] && { echo "Please provide a FILELIST"; exit 1; }
7+
48
DATE=`date +%Y-%m-%d`
59
HOST=`hostname -s`
610
FILES=`cat $FILELIST | wc -l`
7-
FILES_SIZE=$(du -cm `cat ~/src/data/filelist.txt` | tail -n 1 | awk '{print $1}')
11+
FILES_SIZE=$(du -cm `cat $FILELIST` | tail -n 1 | awk '{print $1}')
12+
echo "program,processes,time,total file size,number of files,throughput,throughput per process,date,host"
813

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

16-
BENCHMARK=stage/bin/o2-analysistutorial-histograms
17-
HISTO_ATTEMPTS="16 8 4 2 1"
21+
BENCHMARK=`which o2-analysistutorial-histograms`
22+
[ "X$BENCHMARK" = X ] && { echo "Unable to find o2-analysistutorial-histograms"; exit 1; }
1823
for x in $HISTO_ATTEMPTS ; do
1924
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 //'`
2025
TP=$(bc -l <<< "scale=2; $FILES_SIZE/$T")
@@ -23,8 +28,8 @@ for x in $HISTO_ATTEMPTS ; do
2328
echo "histo (total),$(($x + 4 )),$T,$FILES_SIZE,$FILES,$TP,$TPP,$DATE,$HOST"
2429
done
2530

26-
BENCHMARK=stage/bin/o2-analysistutorial-histograms
27-
HISTO_ATTEMPTS="16 8 4 2 1"
31+
BENCHMARK=`which o2-analysistutorial-histograms`
32+
[ "X$BENCHMARK" = X ] && { echo "Unable to find o2-analysistutorial-histograms"; exit 1; }
2833
for x in $HISTO_ATTEMPTS ; do
2934
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 //'`
3035
TP=$(bc -l <<< "scale=2; $FILES_SIZE/$T")
@@ -33,10 +38,9 @@ for x in $HISTO_ATTEMPTS ; do
3338
echo "histo with 2 jobs (total),$(($x + 7 )),$T,$FILES_SIZE,$FILES,$TP,$TPP,$DATE,$HOST"
3439
done
3540

36-
BENCHMARK=stage/bin/o2-analysis-vertexing-hf
37-
HISTO_ATTEMPTS="8 4 2 1"
41+
BENCHMARK=`which o2-analysis-vertexing-hf`
42+
[ "X$BENCHMARK" = X ] && { echo "Unable to find o2-analysis-vertexing-hf"; exit 1; }
3843
for x in $HISTO_ATTEMPTS ; do
39-
echo $BENCHMARK -b --aod-file @$FILELIST --pipeline vertexerhf-candidatebuildingDzero:2,vertexerhf-decayvertexbuilder2prong:2 --readers $x > log$x.txt >&2
4044
TP=$(bc -l <<< "scale=2; $FILES_SIZE/$T")
4145
TPP=$(bc -l <<< "scale=2; $FILES_SIZE/$T/$x")
4246
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 //'`

0 commit comments

Comments
 (0)