Skip to content

Commit

Permalink
Merge pull request ARM-software#93 from mdigiorgio/android-wloads
Browse files Browse the repository at this point in the history
Android wloads
  • Loading branch information
derkling committed Apr 25, 2016
2 parents 5c368c7 + c6866cd commit 6481e6f
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 49 deletions.
2 changes: 1 addition & 1 deletion ipynb/android/benchmarks/Android_PCMark.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
" # Unlock device screen (assume no password required)\n",
" target.execute('input keyevent 82')\n",
" # Start PCMark on the target device\n",
" target.execute('am start -n com.futuremark.pcmark.android.benchmark/com.futuremark.gypsum.activity.WebViewMainActivity')\n",
" target.execute('monkey -p com.futuremark.pcmark.android.benchmark -c android.intent.category.LAUNCHER 1')\n",
" # Wait few seconds to make sure the app is loaded\n",
" sleep(5)\n",
" \n",
Expand Down
178 changes: 130 additions & 48 deletions ipynb/android/workloads/Android_Recents_Fling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -167,24 +167,26 @@
"name": "stderr",
"output_type": "stream",
"text": [
"2016-04-12 15:13:56,738 INFO : Target - Using base path: /home/pippo/work/lisa\n",
"2016-04-12 15:13:56,740 INFO : Target - Loading custom (inline) target configuration\n",
"2016-04-12 15:13:56,740 INFO : Target - Loading custom (inline) test configuration\n",
"2016-04-12 15:13:56,741 INFO : Target - Devlib modules to load: ['bl', 'cpufreq']\n",
"2016-04-12 15:13:56,742 INFO : Target - Connecting Android target [DEFAULT]\n",
"2016-04-12 15:13:57,210 INFO : Target - Initializing target workdir:\n",
"2016-04-12 15:13:57,211 INFO : Target - /data/local/tmp/devlib-target\n",
"2016-04-12 15:13:59,578 INFO : Target - Topology:\n",
"2016-04-12 15:13:59,579 INFO : Target - [[0, 1, 2, 3], [4, 5]]\n",
"2016-04-12 15:14:00,205 INFO : FTrace - Enabled tracepoints:\n",
"2016-04-12 15:14:00,206 INFO : FTrace - sched_switch\n",
"2016-04-12 15:14:00,207 INFO : FTrace - sched_load_avg_cpu\n",
"2016-04-12 15:14:00,208 INFO : FTrace - cpu_frequency\n",
"2016-04-12 15:14:00,208 INFO : FTrace - cpu_capacity\n",
"2016-04-12 15:14:00,209 INFO : TestEnv - Set results folder to:\n",
"2016-04-12 15:14:00,210 INFO : TestEnv - /home/pippo/work/lisa/results/Android_RecentsFling\n",
"2016-04-12 15:14:00,211 INFO : TestEnv - Experiment results available also in:\n",
"2016-04-12 15:14:00,211 INFO : TestEnv - /home/pippo/work/lisa/results_latest\n"
"2016-04-25 17:12:19,000 INFO : Target - Using base path: /home/pippo/work/lisa\n",
"2016-04-25 17:12:19,001 INFO : Target - Loading custom (inline) target configuration\n",
"2016-04-25 17:12:19,001 INFO : Target - Loading custom (inline) test configuration\n",
"2016-04-25 17:12:19,001 INFO : Target - Devlib modules to load: ['bl', 'cpufreq']\n",
"2016-04-25 17:12:19,002 INFO : Target - Connecting Android target [DEFAULT]\n",
"2016-04-25 17:12:19,380 INFO : Target - Initializing target workdir:\n",
"2016-04-25 17:12:19,381 INFO : Target - /data/local/tmp/devlib-target\n",
"2016-04-25 17:12:21,581 INFO : Target - Topology:\n",
"2016-04-25 17:12:21,582 INFO : Target - [[0, 1, 2, 3], [4, 5]]\n",
"2016-04-25 17:12:22,699 INFO : FTrace - Enabled tracepoints:\n",
"2016-04-25 17:12:22,701 INFO : FTrace - sched_switch\n",
"2016-04-25 17:12:22,701 INFO : FTrace - sched_load_avg_cpu\n",
"2016-04-25 17:12:22,702 INFO : FTrace - cpu_frequency\n",
"2016-04-25 17:12:22,703 INFO : FTrace - cpu_capacity\n",
"2016-04-25 17:12:22,703 WARNING : TestEnv - Wipe previous contents of the results folder:\n",
"2016-04-25 17:12:22,704 WARNING : TestEnv - /home/pippo/work/lisa/results/Android_RecentsFling\n",
"2016-04-25 17:12:22,725 INFO : TestEnv - Set results folder to:\n",
"2016-04-25 17:12:22,725 INFO : TestEnv - /home/pippo/work/lisa/results/Android_RecentsFling\n",
"2016-04-25 17:12:22,726 INFO : TestEnv - Experiment results available also in:\n",
"2016-04-25 17:12:22,726 INFO : TestEnv - /home/pippo/work/lisa/results_latest\n"
]
}
],
Expand Down Expand Up @@ -285,6 +287,39 @@
"collapsed": true
},
"outputs": [],
"source": [
"def open_apps(n):\n",
" \"\"\"\n",
" Open `n` apps on the device\n",
" \n",
" :param n: number of apps to open\n",
" :type n: int\n",
" \"\"\"\n",
" # Get a list of third-party packages\n",
" packages = target.execute('pm list packages -3 | cut -d: -f 2')\n",
" packages = packages.split('\\r\\n')\n",
" # Remove empty string\n",
" packages.pop()\n",
" \n",
" LAUNCH_CMD = 'monkey -p {} -c android.intent.category.LAUNCHER 1 '\n",
" \n",
" if n > len(packages):\n",
" n = len(packages)\n",
" \n",
" logging.info('Opening {} apps...'.format(n))\n",
" for app in packages[:n]:\n",
" logging.debug(' Launching {}'.format(app))\n",
" target.execute(LAUNCH_CMD.format(app))\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def recentsfling_run(exp_dir):\n",
" # Open Recents on the target device\n",
Expand Down Expand Up @@ -316,7 +351,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -361,12 +396,59 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Run experiments and collect traces"
"# Run Flinger"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Prepare Environment"
]
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"N_APPS = 10"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2016-04-25 17:12:23,896 INFO : Opening 10 apps...\n"
]
}
],
"source": [
"open_apps(N_APPS)\n",
"\n",
"# Give apps enough time to open\n",
"sleep(5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Run workload and collect traces"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false,
"scrolled": true
Expand All @@ -376,20 +458,20 @@
"name": "stderr",
"output_type": "stream",
"text": [
"2016-04-12 15:14:07,112 INFO : ------------------------\n",
"2016-04-12 15:14:07,113 INFO : Run workload using performance governor\n",
"2016-04-12 15:14:14,452 INFO : Start Swiping Recents\n",
"2016-04-12 15:14:38,443 INFO : Swiping Recents Completed\n",
"2016-04-12 15:14:44,128 INFO : Parsing FTrace format...\n",
"2016-04-12 15:14:51,841 INFO : Collected events spans a 30.689 [s] time interval\n",
"2016-04-12 15:14:51,842 INFO : Set plots time range to (0.000000, 30.688793)[s]\n",
"2016-04-12 15:14:52,761 INFO : ------------------------\n",
"2016-04-12 15:14:52,761 INFO : Run workload using interactive governor\n",
"2016-04-12 15:15:00,321 INFO : Start Swiping Recents\n",
"2016-04-12 15:15:25,884 INFO : Swiping Recents Completed\n",
"2016-04-12 15:15:33,608 INFO : Parsing FTrace format...\n",
"2016-04-12 15:15:41,310 INFO : Collected events spans a 32.681 [s] time interval\n",
"2016-04-12 15:15:41,310 INFO : Set plots time range to (0.000000, 32.681148)[s]\n"
"2016-04-25 17:12:30,603 INFO : ------------------------\n",
"2016-04-25 17:12:30,604 INFO : Run workload using performance governor\n",
"2016-04-25 17:12:39,662 INFO : Start Swiping Recents\n",
"2016-04-25 17:13:03,456 INFO : Swiping Recents Completed\n",
"2016-04-25 17:13:10,416 INFO : Parsing FTrace format...\n",
"2016-04-25 17:13:20,811 INFO : Collected events spans a 31.152 [s] time interval\n",
"2016-04-25 17:13:20,812 INFO : Set plots time range to (0.000000, 31.152401)[s]\n",
"2016-04-25 17:13:21,974 INFO : ------------------------\n",
"2016-04-25 17:13:21,974 INFO : Run workload using interactive governor\n",
"2016-04-25 17:13:29,693 INFO : Start Swiping Recents\n",
"2016-04-25 17:13:56,598 INFO : Swiping Recents Completed\n",
"2016-04-25 17:14:05,800 INFO : Parsing FTrace format...\n",
"2016-04-25 17:14:13,393 INFO : Collected events spans a 34.177 [s] time interval\n",
"2016-04-25 17:14:13,394 INFO : Set plots time range to (0.000000, 34.177226)[s]\n"
]
}
],
Expand All @@ -415,7 +497,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 14,
"metadata": {
"collapsed": false
},
Expand All @@ -425,20 +507,20 @@
"output_type": "stream",
"text": [
"Frame Statistics for PERFORMANCE governor\n",
"Stats since: 26524169207ns\n",
"Total frames rendered: 10425\n",
"Janky frames: 1175 (11.27%)\n",
"90th percentile: 18ms\n",
"95th percentile: 24ms\n",
"99th percentile: 40ms\n",
"Stats since: 37304374100ns\n",
"Total frames rendered: 216625\n",
"Janky frames: 39887 (18.41%)\n",
"90th percentile: 22ms\n",
"95th percentile: 27ms\n",
"99th percentile: 48ms\n",
"\n",
"Frame Statistics for INTERACTIVE governor\n",
"Stats since: 26524169207ns\n",
"Total frames rendered: 11673\n",
"Janky frames: 1265 (10.84%)\n",
"90th percentile: 17ms\n",
"95th percentile: 24ms\n",
"99th percentile: 40ms\n",
"Stats since: 37304374100ns\n",
"Total frames rendered: 217740\n",
"Janky frames: 39945 (18.35%)\n",
"90th percentile: 22ms\n",
"95th percentile: 27ms\n",
"99th percentile: 48ms\n",
"\n"
]
}
Expand Down

0 comments on commit 6481e6f

Please sign in to comment.