diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 616a7d5b7f..0c6f901f21 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 @@ -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 diff --git a/libexec/profile b/libexec/profile new file mode 100755 index 0000000000..a301fee52e --- /dev/null +++ b/libexec/profile @@ -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 + diff --git a/libexec/profile.sh b/libexec/profile.sh deleted file mode 100755 index 0b1538d7ba..0000000000 --- a/libexec/profile.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -echo PROFILE!!! - -#asprof -e cpu -d 120 \ -# -o tree -f results/$1_tree_cpu.html \ -# $(pidof java) - -#asprof -e nativemem -d 120 \ -# -o tree -f results/$1_tree_nativemem.html \ -# $(pidof java) - -#asprof -e nativemem -d 120 \ -# -f results/$1_mem.jfr \ -# $(pidof java) -