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
27 changes: 17 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]:hallb/clas12/coatjava/coatjava
- git push

build:
Expand All @@ -61,7 +59,7 @@ build:
- coatjava.tar.gz
- clara.tar.gz

depana:
.depana:
allow_failure: true
stage: build
script:
Expand All @@ -78,15 +76,15 @@ download:
paths:
- clas_018779.evio.00001

spotbugs:
.spotbugs:
stage: test
needs: [build]
dependencies: [build]
script:
- 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]
Expand All @@ -100,7 +98,7 @@ unit_tests:
paths:
- publish

docs:
.docs:
stage: test
needs: [build,unit_tests]
dependencies: [build,unit_tests]
Expand Down Expand Up @@ -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!
Expand Down
11 changes: 8 additions & 3 deletions libexec/profile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

# configure:
event=cpu #nativemem
format=flat
Expand All @@ -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
Expand All @@ -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

Loading