summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInhwan Lee <ideal.lee@samsung.com>2017-01-02 20:48:10 +0900
committerInhwan Lee <ideal.lee@samsung.com>2017-01-03 13:28:02 +0900
commit7223102c41562dbe6049ca916e5c6456971e0c5d (patch)
tree7aae61a1da1f47726bda4c2b3caafe6c29535bc6
parent48d88c04b56a34d0ebe1aac072f81737e94d9777 (diff)
downloadlauncher-7223102c41562dbe6049ca916e5c6456971e0c5d.tar.gz
launcher-7223102c41562dbe6049ca916e5c6456971e0c5d.tar.bz2
launcher-7223102c41562dbe6049ca916e5c6456971e0c5d.zip
fix performance_test for tizen 3.0 mobile/wearable
appfw change policy about global application. so performance test enable in various version for dotnet Change-Id: I70bc78281d2b5718ddd9e55946e0ec54d4911e69
-rwxr-xr-xtools/performance_test.sh51
-rwxr-xr-xtools/timestamp.sh12
2 files changed, 45 insertions, 18 deletions
diff --git a/tools/performance_test.sh b/tools/performance_test.sh
index def3105..fa42f79 100755
--- a/tools/performance_test.sh
+++ b/tools/performance_test.sh
@@ -5,11 +5,16 @@ DATE=$(date +%Y%m%d_%H%M)
RESULT_LOG_FILE='result/result_'$DATE'.log'
WAIT_FOR_LAUNCH=10
+WAIT_FOR_LONG_LAUNCH=30
WAIT_FOR_KILL=5
PKG_IDS=()
APP_IDS=()
+LONG_LAUNCHING_APP=(
+ "org.tizen.example.SNSUI.Tizen",
+)
+
initialize ()
{
echo ""
@@ -55,11 +60,14 @@ install_tpk ()
for item in ${TPKS[*]}
do
- INSTALL_MSG=$(sdb install tpk/$item | grep start)
- INSTALL_MSG=$(echo $INSTALL_MSG | sed "s/\[/ /g")
- INSTALL_MSG=$(echo $INSTALL_MSG | sed "s/\]/ /g")
- PKG_IDS+=($(echo $INSTALL_MSG | awk '{print $7}'))
- echo " [>] ($(echo $INSTALL_MSG | awk '{print $7}')) installs complete"
+# INSTALL_MSG=$(sdb install tpk/$item | grep start)
+# INSTALL_MSG=$(echo $INSTALL_MSG | sed "s/\[/ /g")
+# INSTALL_MSG=$(echo $INSTALL_MSG | sed "s/\]/ /g")
+# PKG_IDS+=($(echo $INSTALL_MSG | awk '{print $7}'))
+ INSTALL_PKG=$(sdb install tpk/$item | grep start | sed "s/\[/ /g" | sed "s/\]/ /g" | awk '{print $7}' | tr -d '\r')
+ PKG_IDS+=$INSTALL_PKG
+ #($(echo $INSTALL_PKG)
+ echo " [>] $INSTALL_PKG installs complete"
done
}
@@ -77,7 +85,19 @@ get_current_tpk_apps ()
then
echo $APP_LIST_ENTITY | awk '{print $6}'
fi
- done | sort
+ done | sort | tr -d '\r'
+ )
+#In 3.0 mobile / wearable, appfw install all of application to global application
+ PKG_IDS+=$(
+ sdb shell "su - owner -c 'ls -al /opt/usr/globalapps/ | grep tizenglobalapp'" | while read line
+ do
+ APP_LIST_ENTITY=$line
+ APP_GLOBAL=($(echo $APP_LIST_ENTITY | awk '{print $3}'))
+ if [[ $APP_GLOBAL == 'tizenglobalapp' ]]
+ then
+ echo $APP_LIST_ENTITY | awk '{print $9}'
+ fi
+ done | sort | tr -d '\r'
)
}
@@ -87,10 +107,8 @@ make_appid_list ()
echo "[>] Get application id that installed"
for item in ${PKG_IDS[*]}
do
- APP_LIST_MSG=$(sdb shell "su - owner -c 'app_launcher -l | grep $item'")
- APP_LIST_MSG=${APP_LIST_MSG#*\'}
- APP_LIST_MSG=$(echo $APP_LIST_MSG | sed "s/'/ /g")
- APP_IDS+=($(echo $APP_LIST_MSG | awk '{print $2}'))
+ APP_LIST_MSG=$(sdb shell "su - owner -c 'pkginfo --pkg $item' | grep mainappid" | tail -1)
+ APP_IDS+=($(echo $APP_LIST_MSG | awk '{print $3}' | tr -d '\r'))
done
}
@@ -106,7 +124,7 @@ initialize_first_launch ()
echo "[>] Initial launch an application"
APP_LIST_MSG=$(sdb shell "su - owner -c 'app_launcher -s ${APP_IDS[0]}'")
sleep 10
- APP_LIST_MSG=$(sdb shell "su - owner -c 'app_launcher -k ${APP_IDS[0]}'")
+ APP_LIST_MSG=$(sdb shell "su - owner -c 'app_launcher -t ${APP_IDS[0]}'")
sleep 5
}
@@ -169,8 +187,12 @@ execute_all_app ()
for item in ${APP_IDS[*]}
do
APP_LIST_MSG=$(sdb shell "su - owner -c 'app_launcher -s $item'")
- sleep $WAIT_FOR_LAUNCH
- APP_LIST_MSG=$(sdb shell "su - owner -c 'app_launcher -k $item'")
+ if [[ "${LONG_LAUNCHING_APP[@]}" =~ "${item}" ]]; then
+ sleep $WAIT_FOR_LONG_LAUNCH
+ else
+ sleep $WAIT_FOR_LAUNCH
+ fi
+ APP_LIST_MSG=$(sdb shell "su - owner -c 'app_launcher -t $item'")
sleep $WAIT_FOR_KILL
done
}
@@ -281,5 +303,4 @@ then
finalize
else
help
-fi
-
+fi \ No newline at end of file
diff --git a/tools/timestamp.sh b/tools/timestamp.sh
index 57923a7..8d94aad 100755
--- a/tools/timestamp.sh
+++ b/tools/timestamp.sh
@@ -13,11 +13,17 @@ IS_START=false
echo -e "T(ms)\tAPP ID" | tee -a $RESULT_FILE
while inotifywait -qqre modify "$LOG_FILE"; do
GET_LOG="$(tail -1 $LOG_FILE)"
- GET_LOG=$(echo $GET_LOG | sed "s/(/ /g")
+ GET_LOG=$(echo $GET_LOG | sed "s/(/ /g" | sed "s/)/ /g")
if [[ $GET_LOG == *"app_request_to_launchpad_for_uid"* ]];
then
- APP_NAME=$(echo "$GET_LOG" | grep app_request_to_launchpad_for_uid | awk '{print $13}')
- APP_NAME=$(echo $APP_NAME | tr -d '\r')
+ GET_LOG=$(echo $GET_LOG | tr -d '\r')
+ if [[ $GET_LOG == *target_uid* ]];
+ then
+ APP_NAME=$(echo "$GET_LOG" | grep app_request_to_launchpad_for_uid | awk '{print $15}')
+ else
+ APP_NAME=$(echo "$GET_LOG" | grep app_request_to_launchpad_for_uid | awk '{print $14}')
+ fi
+
IS_DIGIT=$(echo $APP_NAME | sed "s/[^0-9]*//g")
if [[ $IS_DIGIT != $APP_NAME ]];