Skip to content

Commit 21cdac4

Browse files
committed
[misc] Gather more metrics in the test script
1 parent 9feec2a commit 21cdac4

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

hacking/test.sh

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030

3131
# Configuration
32+
HOST="centosvmtest2"
3233
ENVCREATE_FILE="envcreate.csv"
3334
ENVSTART_FILE="envstart.csv"
3435

@@ -45,7 +46,7 @@ if [ -z ${1+x} ]; then ITERATIONS=1; else ITERATIONS=$1; fi
4546

4647
# Prepare create command...
4748
read -r -d '' CMD_CREATE << EOM
48-
coconut e c -w readout-dataflow@master -e '{"hosts":["centosvmtest0"],"dd_enabled":"true","qcdd_enabled":"true"}'
49+
coconut e c -w readout-dataflow@master -e '{"hosts":["$HOST"],"dd_enabled":"true","qcdd_enabled":"true"}'
4950
EOM
5051

5152
# Zero the output files
@@ -54,7 +55,7 @@ truncate -s 0 $ENVSTART_FILE
5455

5556

5657
# Main loop starts here
57-
echo "iter\tenv \tcreate\tstart"
58+
echo "iter\tenv \twarm\tcreate\tstart\tdestroy\troster\tzombies\tshmmon\tshmfiles"
5859
for ((iter=0; iter<$ITERATIONS; iter++)); do
5960

6061

@@ -93,18 +94,33 @@ for ((iter=0; iter<$ITERATIONS; iter++)); do
9394
# EOM
9495
### END TEST CODE
9596

97+
WARM_START=`ssh root@$HOST pgrep -f 'o2control-executor' -c`
98+
9699
OUTPUT=$({time (eval $CMD_START)} 2>&1)
97100
# sleep 1
98101
START_TIME=`echo $OUTPUT|grep "total time:"|awk '{ print $3}'`
99102

100103
# Append measured time to file
101104
csv_append $ENVSTART_FILE $START_TIME
102105

103-
coconut e d -f $ENV > /dev/null 2>&1
106+
CMD_DESTROY="coconut e d -f $ENV"
107+
OUTPUT=$({time (eval $CMD_DESTROY)} 2>&1)
108+
DESTROY_TIME=`echo $OUTPUT|grep "total time:"|awk '{ print $3}'`
109+
110+
COCONUT_TASKS_LEFT_OVER="$(( `coconut t l|wc -l` - 1))"
111+
ZOMBIE_TASKS=`ssh root@$HOST pgrep -f 'OCCPlugin' -c`
112+
113+
# Experimentally determined that shmmonitor needs about 3s to clean up and die
114+
sleep 3
115+
116+
SHMMONITOR_RUNNING=`ssh root@$HOST pgrep -f 'fairmq-shmmonitor' -c`
117+
118+
SHM_LINES=`ssh root@$HOST ls /dev/shm|wc -l`
119+
104120
# sleep 1
105-
ssh root@centosvmtest0 rm -rf "/dev/shm/*"
121+
ssh root@$HOST rm -rf "/dev/shm/*"
106122

107-
echo "${(l:3::0:)iter}\t$ENV\t$CREATE_TIME\t$START_TIME"
123+
echo "${(l:3::0:)iter}\t$ENV\t$WARM_START\t$CREATE_TIME\t$START_TIME\t$DESTROY_TIME\t$COCONUT_TASKS_LEFT_OVER\t$ZOMBIE_TASKS\t$SHMMONITOR_RUNNING\t$SHM_LINES"
108124
done
109125

110126
ENDTIME=$(date +%s.%N)

0 commit comments

Comments
 (0)