diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d033548056..7cb5764b5b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,11 +38,9 @@ mirror: - git config --global user.name "GitLab CI" - git checkout development - git config pull.rebase true - - git remote get-url origin - git remote set-url origin https://github.com/jeffersonlab/coatjava - - git pull + - git pull origin development - git remote set-url origin https://gitlab-ci-token:${CI_JOB_TOKEN}@code.jlab.org/hallb/clas12/coatjava/coatjava.git -# - git remote set-url origin git@code.jlab.org:hallb/clas12/coatjava/coatjava - git push build: @@ -61,7 +59,7 @@ build: - coatjava.tar.gz - clara.tar.gz -depana: +.depana: allow_failure: true stage: build script: @@ -78,7 +76,7 @@ download: paths: - clas_018779.evio.00001 -spotbugs: +.spotbugs: stage: test needs: [build] dependencies: [build] @@ -86,7 +84,7 @@ spotbugs: - tar -xzf coatjava.tar.gz - ./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --spotbugs --quiet --no-progress -unit_tests: +.unit_tests: stage: test needs: [build] dependencies: [build] @@ -100,7 +98,7 @@ unit_tests: paths: - publish -docs: +.docs: stage: test needs: [build,unit_tests] dependencies: [build,unit_tests] @@ -163,14 +161,23 @@ profile: dependencies: [build,decoder] script: - tar -xzf coatjava.tar.gz - - libexec/profile -e cpu clas_018779_00001.hipo + - libexec/profile -f flamegraph -e cpu clas_018779_00001.hipo + - libexec/profile -f flamegraph -e nativemem clas_018779_00001.hipo + - libexec/profile -f flamegraph -e alloc clas_018779_00001.hipo + artifacts: + when: always + expire_in: 1 week + paths: + - pro_flamegraph_cpu_clas_018779_00001 + - pro_flamegraph_nativemem_clas_018779_00001 + - pro_flamegraph_alloc_clas_018779_00001 -deploy: +.deploy: stage: deploy script: - echo DEPLOY! -release: +.release: stage: deploy script: - echo RELEASE! diff --git a/libexec/profile b/libexec/profile index a301fee52e..fefe609977 100755 --- a/libexec/profile +++ b/libexec/profile @@ -1,5 +1,7 @@ #!/bin/bash +set -e + # configure: event=cpu #nativemem format=flat @@ -20,6 +22,7 @@ done shift $((OPTIND-1)) data=$1 stub=$(basename $data) +stub=${stub%%.*} which asprof >& /dev/null [ "$?" -ne 0 ] && echo 'ERROR: asprof is not in $PATH.' && exit 9 @@ -33,14 +36,16 @@ pid_java=$(pgrep -P "$pid_bash") echo PID2=$pid_java -ps waux && ps -p $pid +ps waux && ps -p $pid_java 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 +tail -n 42 pro_$stub.log -asprof -e $event -d $seconds -o $format -f pro_${format}_${event}_$stub.html $pid_java +asprof --title "Coatjava - asprof - $event" -e $event \ + -d $seconds -o $format -f pro_${format}_${event}_$stub $pid_java kill -9 $pid_java +rm -f pro_$stub.hipo