Skip to content

Commit acca11d

Browse files
baltzelltongtongcao
authored andcommitted
Disable some GitLab tests, and make asprof artifacts (#944)
* cleanup * disable unneeded jobs * fix printouts * remove suffix * save profile artifact * debug * fix * add another * cleanup
1 parent 9d530b6 commit acca11d

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

.gitlab-ci.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,9 @@ mirror:
3838
- git config --global user.name "GitLab CI"
3939
- git checkout development
4040
- git config pull.rebase true
41-
- git remote get-url origin
4241
- git remote set-url origin https://github.com/jeffersonlab/coatjava
43-
- git pull
42+
- git pull origin development
4443
- git remote set-url origin https://gitlab-ci-token:${CI_JOB_TOKEN}@code.jlab.org/hallb/clas12/coatjava/coatjava.git
45-
# - git remote set-url origin git@code.jlab.org:hallb/clas12/coatjava/coatjava
4644
- git push
4745

4846
build:
@@ -61,7 +59,7 @@ build:
6159
- coatjava.tar.gz
6260
- clara.tar.gz
6361

64-
depana:
62+
.depana:
6563
allow_failure: true
6664
stage: build
6765
script:
@@ -78,15 +76,15 @@ download:
7876
paths:
7977
- clas_018779.evio.00001
8078

81-
spotbugs:
79+
.spotbugs:
8280
stage: test
8381
needs: [build]
8482
dependencies: [build]
8583
script:
8684
- tar -xzf coatjava.tar.gz
8785
- ./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --spotbugs --quiet --no-progress
8886

89-
unit_tests:
87+
.unit_tests:
9088
stage: test
9189
needs: [build]
9290
dependencies: [build]
@@ -100,7 +98,7 @@ unit_tests:
10098
paths:
10199
- publish
102100

103-
docs:
101+
.docs:
104102
stage: test
105103
needs: [build,unit_tests]
106104
dependencies: [build,unit_tests]
@@ -163,14 +161,23 @@ profile:
163161
dependencies: [build,decoder]
164162
script:
165163
- tar -xzf coatjava.tar.gz
166-
- libexec/profile -e cpu clas_018779_00001.hipo
164+
- libexec/profile -f flamegraph -e cpu clas_018779_00001.hipo
165+
- libexec/profile -f flamegraph -e nativemem clas_018779_00001.hipo
166+
- libexec/profile -f flamegraph -e alloc clas_018779_00001.hipo
167+
artifacts:
168+
when: always
169+
expire_in: 1 week
170+
paths:
171+
- pro_flamegraph_cpu_clas_018779_00001
172+
- pro_flamegraph_nativemem_clas_018779_00001
173+
- pro_flamegraph_alloc_clas_018779_00001
167174

168-
deploy:
175+
.deploy:
169176
stage: deploy
170177
script:
171178
- echo DEPLOY!
172179

173-
release:
180+
.release:
174181
stage: deploy
175182
script:
176183
- echo RELEASE!

libexec/profile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
set -e
4+
35
# configure:
46
event=cpu #nativemem
57
format=flat
@@ -20,6 +22,7 @@ done
2022
shift $((OPTIND-1))
2123
data=$1
2224
stub=$(basename $data)
25+
stub=${stub%%.*}
2326

2427
which asprof >& /dev/null
2528
[ "$?" -ne 0 ] && echo 'ERROR: asprof is not in $PATH.' && exit 9
@@ -33,14 +36,16 @@ pid_java=$(pgrep -P "$pid_bash")
3336

3437
echo PID2=$pid_java
3538

36-
ps waux && ps -p $pid
39+
ps waux && ps -p $pid_java
3740

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

41-
cat pro_$stub.log
44+
tail -n 42 pro_$stub.log
4245

43-
asprof -e $event -d $seconds -o $format -f pro_${format}_${event}_$stub.html $pid_java
46+
asprof --title "Coatjava - asprof - $event" -e $event \
47+
-d $seconds -o $format -f pro_${format}_${event}_$stub $pid_java
4448

4549
kill -9 $pid_java
50+
rm -f pro_$stub.hipo
4651

0 commit comments

Comments
 (0)