Skip to content
Merged
Show file tree
Hide file tree
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
32 changes: 21 additions & 11 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ eb:
needs: [build]
dependencies: [build]
script:
- >
tar -xzf coatjava.tar.gz &&
cd validation/advanced-tests &&
./run-eb-tests.sh -100 ${ARG}
- tar -xzf coatjava.tar.gz
- cd validation/advanced-tests
- ./run-eb-tests.sh -100 ${ARG}
parallel:
matrix:
- ARG: electronproton
Expand All @@ -116,23 +115,34 @@ eb:
- ARG: electronneutronC
- ARG: electronFTpion

decoder:
stage: test
needs: [build,download]
dependencies: [build,download]
script:
- tar -xzf clara.tar.gz
- decoder -n 1000 -o clas_018779_00001.hipo clas_018779.evio.00001
artifacts:
when: always
expire_in: 1 day
paths:
- clas_018779_00001.hipo

clara:
allow_failure: true
stage: test
needs: [build,download]
dependencies: [build,download]
script:
- tar -xzf clara.tar.gz && ls -l
- tar -xzf clara.tar.gz
- run-clara -v -c $CLARA_HOME -t $JL_RUNNER_AVAIL_CPU -y ./etc/services/rgd-clarode.yml -n 100 -o out clas_018779.evio.00001

profile:
stage: test
needs: [build]
dependencies: [build]
needs: [build,decoder]
dependencies: [build,decoder]
script:
- >
tar -xzf coatjava.tar.gz &&
libexec/profile.sh
- tar -xzf coatjava.tar.gz
- libexec/profile -e cpu clas_018779_00001.hipo

deploy:
stage: deploy
Expand Down
46 changes: 46 additions & 0 deletions libexec/profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

# configure:
event=cpu #nativemem
format=flat
nevents=1000
seconds=12
yaml=etc/services/data-ai-uber.yml
while getopts y:n:f:e:s:h opt
do
case $opt in
s) seconds=$OPTARG ;;
y) yaml=$OPTARG ;;
n) nevents=$OPTARG ;;
f) format=$OPTARG ;;
e) event=$OPTARG ;;
h) echo "\nUsage: profile [-y YAML] [-n #] [-e EVENT] datafile" && exit 0 ;;
esac
done
shift $((OPTIND-1))
data=$1
stub=$(basename $data)

which asprof >& /dev/null
[ "$?" -ne 0 ] && echo 'ERROR: asprof is not in $PATH.' && exit 9

recon-util -y $yaml -n $nevents -o pro_$stub.hipo -i $data >& pro_$stub.log &
pid_bash=$!

echo PID1=$pid_bash
sleep 5
pid_java=$(pgrep -P "$pid_bash")

echo PID2=$pid_java

ps waux && ps -p $pid

echo "Waiting for 60 seconds of CoatJava warmup ..."
for x in $(seq 60); do let y=60-$x && echo -e -n "\r$y ..." && sleep 1; done

cat pro_$stub.log

asprof -e $event -d $seconds -o $format -f pro_${format}_${event}_$stub.html $pid_java

kill -9 $pid_java

16 changes: 0 additions & 16 deletions libexec/profile.sh

This file was deleted.