From 0a039e2e126beb8d66ba215717d74c298b43a438 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Thu, 22 Dec 2016 13:41:31 +0900 Subject: [PATCH 01/16] Apply dotnet RPM macros dotnet-build-tools provides RPM macros to support C# build. Each package doesn't need to define macros itself such as %dotnet_assembly_path, %_dotnet_build_conf, %dotnet_assembly_files, and so on. Change-Id: I36e712984e689b938c5872befe4680044004a8de --- packaging/dotnet-launcher.spec | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/packaging/dotnet-launcher.spec b/packaging/dotnet-launcher.spec index 7e12b6e..1d82f0d 100644 --- a/packaging/dotnet-launcher.spec +++ b/packaging/dotnet-launcher.spec @@ -1,11 +1,9 @@ -%{!?dotnet_assembly_path: %define dotnet_assembly_path %{_datadir}/assembly} - Name: dotnet-launcher Summary: Launchpad plugin for dotnet apps Version: 1.0.1 Release: 2 Group: Application Framework/Application State Management -License: Apache License, Version 2.0 +License: Apache-2.0 Source0: %{name}-%{version}.tar.gz AutoReqProv: no @@ -19,10 +17,8 @@ BuildRequires: pkgconfig(pkgmgr-info) BuildRequires: pkgconfig(pkgmgr-installer) BuildRequires: pkgconfig(elementary) BuildRequires: aul-devel -BuildRequires: mono-compiler -BuildRequires: mono-devel -BuildRequires: csapi-tizen-nuget BuildRequires: dotnet-build-tools + Requires: aul Requires(post): /sbin/ldconfig @@ -34,8 +30,8 @@ Requires(preun): /usr/bin/systemctl %define _loaderdir %{_prefix}/share/aul %define _configdir /etc %define _device_api_dir %{dotnet_assembly_path} -%define _runtime_dir /opt/usr/share/dotnet/shared/Microsoft.NETCore.App/1.1.0 -%define _preload_dir /opt/usr/share/dotnet.tizen/preload +%define _runtime_dir /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0 +%define _preload_dir /usr/share/dotnet.tizen/preload %define _install_plugin_dir /usr/etc/package-manager/parserlib ExcludeArch: %{ix86} aarch64 @@ -47,11 +43,6 @@ Launchpad plugin for launching dotnet apps %setup -q %build -%if 0%{?tizen_build_devel_mode} -%define _buildmode Debug -%else -%define _buildmode Release -%endif cmake \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DPACKAGE_NAME=%{name} \ @@ -59,7 +50,7 @@ cmake \ -DBINDIR=%{_bindir} \ -DLOADERDIR=%{_loaderdir} \ -DCONFIGDIR=%{_configdir} \ - -DCMAKE_BUILD_TYPE=%{_buildmode} \ + -DCMAKE_BUILD_TYPE=%{_dotnet_build_conf} \ -DDEVICE_API_DIR=%{_device_api_dir} \ -DRUNTIME_DIR=%{_runtime_dir} \ -DCROSSGEN_PATH=%{_device_api_dir}/crossgen \ @@ -74,14 +65,14 @@ make %{?jobs:-j%jobs} VERBOSE=1 nuget restore Tizen.Runtime/Tizen.Runtime.Coreclr.project.json xbuild \ - /p:Configuration=%{_buildmode} \ + /p:Configuration=%{_dotnet_build_conf} \ /p:PreloadPath=%{_preload_dir} \ Tizen.Runtime/Tizen.Runtime.Coreclr.csproj nuget restore Tizen.Runtime/Tizen.Runtime.Mono.project.json xbuild \ - /p:Configuration=%{_buildmode} \ + /p:Configuration=%{_dotnet_build_conf} \ /p:PreloadPath=%{_preload_dir} \ Tizen.Runtime/Tizen.Runtime.Mono.csproj -- 2.7.4 From 48d88c04b56a34d0ebe1aac072f81737e94d9777 Mon Sep 17 00:00:00 2001 From: Cho Woong Suk Date: Mon, 2 Jan 2017 10:41:03 +0900 Subject: [PATCH 02/16] Runtime directory is changed to /opt/usr/share/dotnet because of capacity shortage of rootfs Change-Id: I0670b00e8b180bed23b4469304067dafb324fe0a --- packaging/dotnet-launcher.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/dotnet-launcher.spec b/packaging/dotnet-launcher.spec index 1d82f0d..ac73341 100644 --- a/packaging/dotnet-launcher.spec +++ b/packaging/dotnet-launcher.spec @@ -30,8 +30,8 @@ Requires(preun): /usr/bin/systemctl %define _loaderdir %{_prefix}/share/aul %define _configdir /etc %define _device_api_dir %{dotnet_assembly_path} -%define _runtime_dir /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0 -%define _preload_dir /usr/share/dotnet.tizen/preload +%define _runtime_dir /opt/usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0 +%define _preload_dir /opt/usr/share/dotnet.tizen/preload %define _install_plugin_dir /usr/etc/package-manager/parserlib ExcludeArch: %{ix86} aarch64 -- 2.7.4 From 7223102c41562dbe6049ca916e5c6456971e0c5d Mon Sep 17 00:00:00 2001 From: Inhwan Lee Date: Mon, 2 Jan 2017 20:48:10 +0900 Subject: [PATCH 03/16] 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 --- tools/performance_test.sh | 51 +++++++++++++++++++++++++++++++++-------------- tools/timestamp.sh | 12 ++++++++--- 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 ]]; -- 2.7.4 From 4a3f29faebc1a96ce5197a25934538d79f0b1687 Mon Sep 17 00:00:00 2001 From: Pawel Andruszkiewicz Date: Thu, 5 Jan 2017 10:22:46 +0100 Subject: [PATCH 04/16] Use executables when trying to resolve an assembly Some applications define types referenced from XAML in the executable files, this commit handles such cases. Change-Id: I422e7ad1b8d463c8afac663a4eab58cd150c983a Signed-off-by: Pawel Andruszkiewicz --- Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyLoader.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyLoader.cs b/Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyLoader.cs index 35a8ddf..3423d80 100755 --- a/Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyLoader.cs +++ b/Tizen.Runtime/Tizen.Runtime.Coreclr/AssemblyLoader.cs @@ -29,14 +29,16 @@ namespace Tizen.Runtime.Coreclr private const string DllAssemblySuffix = ".dll"; + private const string ExeAssemblySuffix = ".exe"; + private const string NativeDllAssemblySuffix = NativeAssemblyInfix + DllAssemblySuffix; - private static readonly string[] s_suffixes = new string[] { NativeDllAssemblySuffix, DllAssemblySuffix }; + private static readonly string[] s_suffixes = new string[] { NativeDllAssemblySuffix, DllAssemblySuffix, ExeAssemblySuffix }; private SortedSet _dllDirectories = new SortedSet(); private SortedSet _nativeDirectories = new SortedSet(); - private HashSet _dllCache = new HashSet(); + private HashSet _assemblyCache = new HashSet(); public AssemblyLoader() { @@ -64,9 +66,9 @@ namespace Tizen.Runtime.Coreclr { var info = new FileInfo(file); - if (info.Extension == DllAssemblySuffix) + if (s_suffixes.Contains(info.Extension)) { - _dllCache.Add(info); + _assemblyCache.Add(info); } } } @@ -77,7 +79,7 @@ namespace Tizen.Runtime.Coreclr _dllDirectories.Remove(directory); _nativeDirectories.Remove(directory); - _dllCache.RemoveWhere(x => x.DirectoryName == directory); + _assemblyCache.RemoveWhere(x => x.DirectoryName == directory); } public Assembly LoadFromPath(string path) @@ -125,7 +127,7 @@ namespace Tizen.Runtime.Coreclr { foreach (string suffix in s_suffixes) { - var info = _dllCache.FirstOrDefault(x => x.Name == assemblyName.Name + suffix); + var info = _assemblyCache.FirstOrDefault(x => x.Name == assemblyName.Name + suffix); if (info != null) { -- 2.7.4 From aaf7f9ebdb31954599e59ee4a770867f6fc26825 Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Wed, 4 Jan 2017 11:20:15 +0900 Subject: [PATCH 05/16] Add tool option for check launching memory Change-Id: Id683972b75950ff031550bd74c3d4003fb41d032 --- tools/memorystamp.sh | 57 ++++++++++++++++++ tools/performance_test.sh | 144 +++++++++++++++++++++++++++++++++++----------- 2 files changed, 169 insertions(+), 32 deletions(-) create mode 100755 tools/memorystamp.sh diff --git a/tools/memorystamp.sh b/tools/memorystamp.sh new file mode 100755 index 0000000..6db944f --- /dev/null +++ b/tools/memorystamp.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +if [[ -z $1 ]] || [[ -z $2 ]] +then + echo "[!] Execute [./performance_test.sh]" + exit 0 +fi + +LOG_FILE=$1 +RESULT_FILE=$2 +WAIT_FOR_LAUNCH=10 + +APP_MEMORY=$(sdb shell "memps -v | grep 'Available'" | tail -1) +BEFORE_MEMORY=($(echo $APP_MEMORY | awk '{print $5}')) +while inotifywait -qqre modify "$LOG_FILE"; do + sleep $WAIT_FOR_LAUNCH + APP_MEMORY=$(sdb shell "memps -v | grep 'Tizen.exe'" | tail -1) + MEMORY_PID=($(echo $APP_MEMORY | awk '{print $1}')) + MEMORY_PSS=($(echo $APP_MEMORY | awk '{print $7}')) + MEMORY_3D=($(echo $APP_MEMORY | awk '{print $8}')) + MEMORY_GEM=($(echo $APP_MEMORY | awk '{print $9}')) + APP_MEMORY=$(sdb shell "memps -v | grep 'Available'" | tail -1) + AFTER_MEMORY=($(echo $APP_MEMORY | awk '{print $5}')) + let MEMORY_FREE=$BEFORE_MEMORY-$AFTER_MEMORY + echo -e "PSS\t3D\tGEM\tFREE" | tee -a $RESULT_FILE + echo -e "$MEMORY_PSS\t$MEMORY_3D\t$MEMORY_GEM\t$MEMORY_FREE" | tee -a $RESULT_FILE + DETAIL_MEMORY=$(sdb shell "memps $MEMORY_PID" | while read line + do + DETAIL_MEMORY_LIST=$line + DETAIL_PCODE=($(echo $DETAIL_MEMORY_LIST | awk '{print $3}' | tr -d '\r')) + DETAIL_PDATA=($(echo $DETAIL_MEMORY_LIST | awk '{print $4}' | tr -d '\r')) + if [[ $DETAIL_PCODE != "P(CODE)" ]] && [[ $DETAIL_PDATA != "P(DATA)" ]] && + [[ $DETAIL_PCODE != "--------" ]] && [[ $DETAIL_PDATA != "--------" ]] + then + let DETAIL_SUM=$DETAIL_PCODE+$DETAIL_PDATA + if [[ $DETAIL_SUM -ge 100 ]] + then + DETAIL_OBJECT=($(echo $DETAIL_MEMORY_LIST | awk '{print $6}')) + echo -n "$DETAIL_SUM\t$DETAIL_OBJECT" + echo "" + fi + fi + done | sort -n -r | tr -d '\r' + ) + echo -e "P(C+D)\tOBJECT NAME" | tee -a $RESULT_FILE + for item in ${DETAIL_MEMORY[*]} + do + echo -e $item | tee -a $RESULT_FILE + done + echo -e "" | tee -a $RESULT_FILE + sleep 3 + sdb shell kill -9 $MEMORY_PID + sleep $WAIT_FOR_LAUNCH + echo -e "T(ms)\tAPP ID" | tee -a $RESULT_FILE + APP_MEMORY=$(sdb shell "memps -v | grep 'Available'" | tail -1) + BEFORE_MEMORY=($(echo $APP_MEMORY | awk '{print $5}')) +done diff --git a/tools/performance_test.sh b/tools/performance_test.sh index fa42f79..370f425 100755 --- a/tools/performance_test.sh +++ b/tools/performance_test.sh @@ -60,33 +60,30 @@ 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}')) - 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" + 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}' | tr -d '\r')) + echo " [>] ($(echo $INSTALL_MSG | awk '{print $7}')) installs complete" done } get_current_tpk_apps () { echo "[>] Get application list in device" - PKG_IDS+=$( - sdb shell "su - owner -c 'pkgcmd -l | grep tpk'" | while read line - do - APP_LIST_ENTITY=$line - APP_LIST_ENTITY=$(echo $APP_LIST_ENTITY | sed "s/\[/ /g") - APP_LIST_ENTITY=$(echo $APP_LIST_ENTITY | sed "s/\]/ /g") - APP_OWNER=($(echo $APP_LIST_ENTITY | awk '{print $1}')) - if [[ $APP_OWNER == 'user' ]] - then - echo $APP_LIST_ENTITY | awk '{print $6}' - fi - done | sort | tr -d '\r' - ) +# PKG_IDS+=$( +# sdb shell "su - owner -c 'pkgcmd -l | grep tpk'" | while read line +# do +# APP_LIST_ENTITY=$line +# APP_LIST_ENTITY=$(echo $APP_LIST_ENTITY | sed "s/\[/ /g") +# APP_LIST_ENTITY=$(echo $APP_LIST_ENTITY | sed "s/\]/ /g") +# APP_OWNER=($(echo $APP_LIST_ENTITY | awk '{print $1}')) +# if [[ $APP_OWNER == 'user' ]] +# then +# echo $APP_LIST_ENTITY | awk '{print $6}' +# fi +# 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 @@ -131,7 +128,7 @@ initialize_first_launch () execute_time_stamp_auto () { echo "" - echo "[>] Start performance test that applciation launching " + echo "[>] Start performance test that applciation launching time" echo "" #execute dlogstreamer sdb shell "dlogutil -c" @@ -142,11 +139,27 @@ execute_time_stamp_auto () TIMESTAMP_PID=$! } +execute_time_stamp_auto_memory () +{ + echo "" + echo "[>] Start performance test that applciation launching memory" + echo "" + sdb shell "dlogutil -c" + sdb shell "dlogutil -v time AUL APP_CORE|grep -E 'app_request_to_launchpad_for_uid.*[SECURE_LOG].*launch.*request|__show_cb.*[EVENT_TEST][EVENT]'" >> $STREAM_LOG_FILE & + DLOG_STREAMER_PID=$! +#execute timestamp + /bin/bash ./timestamp.sh $STREAM_LOG_FILE $RESULT_LOG_FILE & + TIMESTAMP_PID=$! +#execute memorystamp + /bin/bash ./memorystamp.sh $STREAM_LOG_FILE $RESULT_LOG_FILE & + MEMORYSTAMP_PID=$! +} + execute_time_stamp_manual () { #execute dlogstreamer echo "" - echo "[>] Start performance test that applciation launching " + echo "[>] Start performance test that applciation launching time" echo "" rm $STREAM_LOG_FILE touch $STREAM_LOG_FILE @@ -163,7 +176,7 @@ execute_time_stamp_manual_trace () { #execute dlogstreamer echo "" - echo "[>] Start performance test that applciation launching " + echo "[>] Start performance test that applciation launching time" echo "" rm $STREAM_LOG_FILE touch $STREAM_LOG_FILE @@ -181,6 +194,25 @@ execute_time_stamp_manual_trace () rm result/*.raw } +execute_time_stamp_manual_memory () +{ + echo "" + echo "[>] Start performance test that applciation launching memory" + echo "" + rm $STREAM_LOG_FILE + touch $STREAM_LOG_FILE + sdb shell "dlogutil -c" + sdb shell "dlogutil -v time AUL APP_CORE|grep -E 'app_request_to_launchpad_for_uid.*[SECURE_LOG].*launch.*request|__show_cb.*[EVENT_TEST][EVENT]'" >> $STREAM_LOG_FILE & + DLOG_STREAMER_PID=$! +#execute timestamp + /bin/bash ./timestamp.sh $STREAM_LOG_FILE $RESULT_LOG_FILE & + TIMESTAMP_PID=$! +#execute memorystamp + /bin/bash ./memorystamp.sh $STREAM_LOG_FILE $RESULT_LOG_FILE & + MEMORYSTAMP_PID=$! + wait $MEMORYSTAMP_PID +} + execute_all_app () { #execute each apps @@ -206,7 +238,11 @@ execute_all_app_trace () TTRACE_PID=$! sleep 1 APP_LIST_MSG=$(sdb shell "su - owner -c 'app_launcher -s $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 sleep 4 @@ -215,6 +251,24 @@ execute_all_app_trace () rm result/*.raw } +execute_all_app_memory () +{ + sleep $WAIT_FOR_LAUNCH +#execute each apps + for item in ${APP_IDS[*]} + do + if [[ "${LONG_LAUNCHING_APP[@]}" =~ "${item}" ]]; then + echo "" + else + APP_LIST_MSG=$(sdb shell "su - owner -c 'app_launcher -s $item'") + sleep $WAIT_FOR_LONG_LAUNCH + #APP_LIST_MSG=$(sdb shell "su - owner -c 'app_launcher -t $item'") + sleep $WAIT_FOR_KILL + fi + sleep $WAIT_FOR_LONG_LAUNCH + done +} + finalize () { echo "" @@ -231,6 +285,7 @@ destory () kill -9 $DLOG_STREAMER_PID>/dev/null 2>&1 kill -9 $TIMESTAMP_PID>/dev/null 2>&1 kill -9 $TTRACE_PID>/dev/null 2>&1 + kill -9 $MEMORYSTAMP_PID>/dev/null 2>&1 rm $STREAM_LOG_FILE>/dev/null 2>&1 sdb shell "devicectl display start">/dev/null 2>&1 echo "[>] Finalize for Performance Test" @@ -241,11 +296,13 @@ help () { echo "" echo "[!] usage :