Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a6166e

Browse files
committed
Timing operations.
1 parent 35aa46e commit 6a6166e

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

.travis/install_sqlcl.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ set -ev
44
SQLCL_FILE=sqlcl-4.2.0.16.355.0402-no-jre.zip
55
cd .travis
66

7+
begin=$(date +"%s")
8+
79
# Download if not present on cache dir.
810
if [ ! -f $CACHE_DIR/$SQLCL_FILE ]; then
911
sh download.sh -p sqlcl
@@ -13,5 +15,9 @@ fi;
1315
# Install sqlcl.
1416
unzip -q $CACHE_DIR/$SQLCL_FILE -d $HOME
1517

18+
end=$(date +"%s")
19+
diff=$(($end-$begin))
20+
echo "$(($diff / 60)) minutes and $(($diff % 60)) to download and install SQLCL."
21+
1622
# Check if it is installed correctly.
1723
$SQLCLI -v

.travis/start_db.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,50 @@ set -e
1818
if [ $ORACLE_VERSION = $ORACLE_12cR1SE ]; then
1919
docker login -u "$DOCKER_12cR1SE_USER" -p "$DOCKER_12cR1SE_PASS"
2020
# docker run -d --name $ORACLE_VERSION -p 1521:1521 -v $HOME/$ORACLE_VERSION:/opt/oracle/oradata viniciusam/oracle-12c-r1-se
21+
22+
begin=$(date +"%s")
23+
docker pull viniciusam/oracle-12c-r1-se
24+
end=$(date +"%s")
25+
diff=$(($end-$begin))
26+
echo "$(($diff / 60)) minutes and $(($diff % 60)) to pull the image."
27+
28+
docker images
29+
30+
begin=$(date +"%s")
2131
docker run -d --name $ORACLE_VERSION -p 1521:1521 viniciusam/oracle-12c-r1-se
32+
end=$(date +"%s")
33+
diff=$(($end-$begin))
34+
echo "$(($diff / 60)) minutes and $(($diff % 60)) to run the image."
35+
2236
docker logs -f $ORACLE_VERSION | grep -m 1 "DATABASE IS READY TO USE!" --line-buffered
2337
# docker exec $ORACLE_VERSION ./setPassword.sh $ORACLE_PWD
38+
39+
begin=$(date +"%s")
2440
docker exec $ORACLE_VERSION ./createPDB.sh
41+
end=$(date +"%s")
42+
diff=$(($end-$begin))
43+
echo "$(($diff / 60)) minutes and $(($diff % 60)) to create the PDB."
2544
fi
2645

2746
# Oracle 11g R2 XE
2847
if [ $ORACLE_VERSION = $ORACLE_11gR2XE ]; then
2948
docker login -u "$DOCKER_11gR2XE_USER" -p "$DOCKER_11gR2XE_PASS"
3049
# docker run -d --name $ORACLE_VERSION --shm-size=1g -p 1521:1521 -v $HOME/$ORACLE_VERSION:/u01/app/oracle/oradata vavellar/oracle-11g-r2-xe
50+
51+
begin=$(date +"%s")
52+
docker pull vavellar/oracle-11g-r2-xe
53+
end=$(date +"%s")
54+
diff=$(($end-$begin))
55+
echo "$(($diff / 60)) minutes and $(($diff % 60)) to pull the image."
56+
57+
docker images
58+
59+
begin=$(date +"%s")
3160
docker run -d --name $ORACLE_VERSION --shm-size=1g -p 1521:1521 vavellar/oracle-11g-r2-xe
61+
end=$(date +"%s")
62+
diff=$(($end-$begin))
63+
echo "$(($diff / 60)) minutes and $(($diff % 60)) to run the image."
64+
3265
docker logs -f $ORACLE_VERSION | grep -m 1 "DATABASE IS READY TO USE!" --line-buffered
3366
docker exec $ORACLE_VERSION ./setPassword.sh $ORACLE_PWD
3467
fi

0 commit comments

Comments
 (0)