• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2 "cells": [
3  {
4   "cell_type": "markdown",
5   "metadata": {},
6   "source": [
7    "# Tutorial Goal"
8   ]
9  },
10  {
11   "cell_type": "markdown",
12   "metadata": {},
13   "source": [
14    "This tutorial aims to show how to **configure and run** a predefined set of\n",
15    "**synthetic workload** using the **executor module** provided by LISA."
16   ]
17  },
18  {
19   "cell_type": "markdown",
20   "metadata": {},
21   "source": [
22    "# Configure logging"
23   ]
24  },
25  {
26   "cell_type": "code",
27   "execution_count": 1,
28   "metadata": {
29    "collapsed": true
30   },
31   "outputs": [],
32   "source": [
33    "import logging\n",
34    "from conf import LisaLogging\n",
35    "LisaLogging.setup()"
36   ]
37  },
38  {
39   "cell_type": "code",
40   "execution_count": 2,
41   "metadata": {
42    "collapsed": false
43   },
44   "outputs": [],
45   "source": [
46    "# Execute this cell to enabled executor debugging statements\n",
47    "logging.getLogger('Executor').setLevel(logging.DEBUG)"
48   ]
49  },
50  {
51   "cell_type": "markdown",
52   "metadata": {},
53   "source": [
54    "# Target Configuration"
55   ]
56  },
57  {
58   "cell_type": "code",
59   "execution_count": 3,
60   "metadata": {
61    "collapsed": false,
62    "scrolled": true
63   },
64   "outputs": [
65    {
66     "name": "stderr",
67     "output_type": "stream",
68     "text": [
69      "2016-11-17 17:00:31,811 INFO    :         Target - Using base path: /home/bjackman/sources/lisa\n",
70      "2016-11-17 17:00:31,812 INFO    :         Target - Loading custom (inline) target configuration\n",
71      "2016-11-17 17:00:31,812 DEBUG   :         Target - Target configuration {'username': 'brendan', 'platform': 'linux', 'host': '192.168.0.1', 'ftrace': {'buffsize': 81920, 'events': ['sched_switch', 'sched_wakeup', 'sched_wakeup_new', 'cpu_frequency']}, 'board': 'juno', 'modules': ['bl', 'cpufreq'], 'password': 'test0000', 'tools': ['trace-cmd', 'perf'], 'results_dir': 'ExecutorExample'}\n",
72      "2016-11-17 17:00:31,813 INFO    :         Target - Devlib modules to load: ['bl', 'cpufreq', 'hwmon']\n",
73      "2016-11-17 17:00:31,814 INFO    :         Target - Connecting linux target:\n",
74      "2016-11-17 17:00:31,815 INFO    :         Target -   username : brendan\n",
75      "2016-11-17 17:00:31,816 INFO    :         Target -       host : 192.168.0.1\n",
76      "2016-11-17 17:00:31,817 INFO    :         Target -   password : \n",
77      "2016-11-17 17:00:31,819 INFO    :         Target - Connection settings:\n",
78      "2016-11-17 17:00:31,820 INFO    :         Target -    {'username': 'brendan', 'host': '192.168.0.1', 'password': ''}\n",
79      "2016-11-17 17:00:31,821 DEBUG   :         Target - Setup LINUX target...\n",
80      "2016-11-17 17:00:31,828 DEBUG   : Installing module vexpress-u-boot\n",
81      "2016-11-17 17:00:31,829 DEBUG   : Installing module vexpress-dtr\n",
82      "2016-11-17 17:00:31,830 DEBUG   : Installing module vexpress-vemsd\n",
83      "2016-11-17 17:00:31,831 DEBUG   : Logging in brendan@192.168.0.1\n",
84      "2016-11-17 17:00:33,311 DEBUG   : id\n",
85      "2016-11-17 17:00:33,722 DEBUG   : echo $USER\n",
86      "2016-11-17 17:00:34,128 DEBUG   : if [ -e '/home/brendan/devlib-target/bin' ]; then echo 1; else echo 0; fi\n",
87      "2016-11-17 17:00:34,534 DEBUG   : ls -1 /home/brendan/devlib-target/bin\n",
88      "2016-11-17 17:00:34,944 DEBUG   : cat /proc/cpuinfo\n",
89      "2016-11-17 17:00:35,353 DEBUG   : sudo -- sh -c 'ls /'\n",
90      "2016-11-17 17:00:35,901 DEBUG   : sudo -- sh -c 'dmidecode -s system-version'\n",
91      "2016-11-17 17:00:36,706 DEBUG   : Installing module bl\n",
92      "2016-11-17 17:00:36,808 DEBUG   : uname -m\n",
93      "2016-11-17 17:00:37,216 DEBUG   : if [ -e '/sys/devices/system/cpu/cpufreq' ]; then echo 1; else echo 0; fi\n",
94      "2016-11-17 17:00:37,523 DEBUG   : Installing module cpufreq\n",
95      "2016-11-17 17:00:37,624 DEBUG   : if [ -e '/sys/class/hwmon' ]; then echo 1; else echo 0; fi\n",
96      "2016-11-17 17:00:37,931 DEBUG   : Installing module hwmon\n",
97      "2016-11-17 17:00:38,033 DEBUG   : ls -1 /sys/class/hwmon\n",
98      "2016-11-17 17:00:38,442 DEBUG   : if [ -e '/sys/class/hwmon/hwmon0/name' ]; then echo 1; else echo 0; fi\n",
99      "2016-11-17 17:00:38,848 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/name'\\'''\n",
100      "2016-11-17 17:00:39,754 DEBUG   : ls -1 /sys/class/hwmon/hwmon0/\n",
101      "2016-11-17 17:00:40,166 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/curr1_label'\\'''\n",
102      "2016-11-17 17:00:41,072 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/curr2_label'\\'''\n",
103      "2016-11-17 17:00:41,977 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/curr3_label'\\'''\n",
104      "2016-11-17 17:00:42,882 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/curr4_label'\\'''\n",
105      "2016-11-17 17:00:43,788 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy1_label'\\'''\n",
106      "2016-11-17 17:00:44,694 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_label'\\'''\n",
107      "2016-11-17 17:00:45,599 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_label'\\'''\n",
108      "2016-11-17 17:00:46,505 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy4_label'\\'''\n",
109      "2016-11-17 17:00:47,410 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/in0_label'\\'''\n",
110      "2016-11-17 17:00:48,316 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/in1_label'\\'''\n",
111      "2016-11-17 17:00:49,221 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/in2_label'\\'''\n",
112      "2016-11-17 17:00:50,126 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/in3_label'\\'''\n",
113      "2016-11-17 17:00:51,032 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/in4_label'\\'''\n",
114      "2016-11-17 17:00:51,938 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/in5_label'\\'''\n",
115      "2016-11-17 17:00:52,843 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/in6_label'\\'''\n",
116      "2016-11-17 17:00:53,749 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/power1_label'\\'''\n",
117      "2016-11-17 17:00:54,654 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/power2_label'\\'''\n",
118      "2016-11-17 17:00:55,560 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/power3_label'\\'''\n",
119      "2016-11-17 17:00:56,466 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/power4_label'\\'''\n",
120      "2016-11-17 17:00:57,371 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/temp1_label'\\'''\n",
121      "2016-11-17 17:00:58,277 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/temp2_label'\\'''\n",
122      "2016-11-17 17:00:59,082 DEBUG   :         Target - Checking target connection...\n",
123      "2016-11-17 17:00:59,083 DEBUG   :         Target - Target info:\n",
124      "2016-11-17 17:00:59,084 DEBUG   :         Target -       ABI: arm64\n",
125      "2016-11-17 17:00:59,085 DEBUG   :         Target -      CPUs: CpuInfo(['A53', 'A57', 'A57', 'A53', 'A53', 'A53'])\n",
126      "2016-11-17 17:00:59,087 DEBUG   :         Target -  Clusters: [0, 1, 1, 0, 0, 0]\n",
127      "2016-11-17 17:00:59,088 INFO    :         Target - Initializing target workdir:\n",
128      "2016-11-17 17:00:59,089 INFO    :         Target -    /home/brendan/devlib-target\n",
129      "2016-11-17 17:00:59,190 DEBUG   : mkdir -p /home/brendan/devlib-target\n",
130      "2016-11-17 17:00:59,599 DEBUG   : mkdir -p /home/brendan/devlib-target/bin\n",
131      "2016-11-17 17:00:59,909 DEBUG   : /usr/bin/scp -r   /home/bjackman/sources/lisa/libs/devlib/devlib/bin/arm64/busybox brendan@192.168.0.1:/home/brendan/devlib-target/bin/busybox\n",
132      "2016-11-17 17:01:00,410 DEBUG   : chmod a+x /home/brendan/devlib-target/bin/busybox\n",
133      "2016-11-17 17:01:00,718 DEBUG   : /usr/bin/scp -r   /home/bjackman/sources/lisa/libs/devlib/devlib/bin/scripts/shutils brendan@192.168.0.1:/home/brendan/devlib-target/bin/shutils\n",
134      "2016-11-17 17:01:01,202 DEBUG   : chmod a+x /home/brendan/devlib-target/bin/shutils\n",
135      "2016-11-17 17:01:01,511 DEBUG   : /usr/bin/scp -r   /home/bjackman/sources/lisa/tools/arm64/trace-cmd brendan@192.168.0.1:/home/brendan/devlib-target/bin/trace-cmd\n",
136      "2016-11-17 17:01:01,856 DEBUG   : chmod a+x /home/brendan/devlib-target/bin/trace-cmd\n",
137      "2016-11-17 17:01:02,164 DEBUG   : /usr/bin/scp -r   /home/bjackman/sources/lisa/tools/arm64/perf brendan@192.168.0.1:/home/brendan/devlib-target/bin/perf\n",
138      "2016-11-17 17:01:02,549 DEBUG   : chmod a+x /home/brendan/devlib-target/bin/perf\n",
139      "2016-11-17 17:01:02,856 DEBUG   :         Target - Check for module [bl]...\n",
140      "2016-11-17 17:01:02,857 DEBUG   :         Target - Check for module [cpufreq]...\n",
141      "2016-11-17 17:01:02,858 DEBUG   :         Target - Check for module [hwmon]...\n",
142      "2016-11-17 17:01:02,860 INFO    :         Target - Topology:\n",
143      "2016-11-17 17:01:02,861 INFO    :         Target -    [[0, 3, 4, 5], [1, 2]]\n",
144      "2016-11-17 17:01:02,962 DEBUG   : sudo -- sh -c 'cat '\\''/sys/devices/system/cpu/online'\\'''\n",
145      "2016-11-17 17:01:03,868 DEBUG   : cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies\n",
146      "2016-11-17 17:01:04,276 DEBUG   : sudo -- sh -c 'cat '\\''/sys/devices/system/cpu/online'\\'''\n",
147      "2016-11-17 17:01:05,181 DEBUG   : cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies\n",
148      "2016-11-17 17:01:05,490 DEBUG   :       Platform - Trying to load default EM from /home/bjackman/sources/lisa/libs/utils/platforms/juno.json\n",
149      "2016-11-17 17:01:05,491 DEBUG   :       Platform - Platform descriptor initialized\n",
150      "{'nrg_model': None, 'clusters': {'big': [1, 2], 'little': [0, 3, 4, 5]}, 'cpus_count': 6, 'freqs': {'big': [450000, 625000, 800000, 950000, 1100000], 'little': [450000, 575000, 700000, 775000, 850000]}, 'topology': [[0, 3, 4, 5], [1, 2]]}\n",
151      "2016-11-17 17:01:05,509 DEBUG   : /usr/bin/scp -r   /home/bjackman/sources/lisa/libs/devlib/devlib/bin/arm64/trace-cmd brendan@192.168.0.1:/home/brendan/devlib-target/bin/trace-cmd\n",
152      "2016-11-17 17:01:05,949 DEBUG   : chmod a+x /home/brendan/devlib-target/bin/trace-cmd\n",
153      "2016-11-17 17:01:06,357 DEBUG   : sudo -- sh -c 'cat /sys/kernel/debug/tracing/available_events'\n",
154      "2016-11-17 17:01:07,172 INFO    :         FTrace - Enabled tracepoints:\n",
155      "2016-11-17 17:01:07,173 INFO    :         FTrace -   sched_switch\n",
156      "2016-11-17 17:01:07,174 INFO    :         FTrace -   sched_wakeup\n",
157      "2016-11-17 17:01:07,175 INFO    :         FTrace -   sched_wakeup_new\n",
158      "2016-11-17 17:01:07,176 INFO    :         FTrace -   cpu_frequency\n",
159      "2016-11-17 17:01:07,177 DEBUG   : No RT-App workloads, skipping calibration\n",
160      "2016-11-17 17:01:07,178 WARNING :        TestEnv - Wipe previous contents of the results folder:\n",
161      "2016-11-17 17:01:07,179 WARNING :        TestEnv -    /home/bjackman/sources/lisa/results/ExecutorExample\n",
162      "2016-11-17 17:01:07,181 DEBUG   :    EnergyMeter - using default energy meter for [juno]\n",
163      "2016-11-17 17:01:07,182 INFO    :          HWMon - Scanning for HWMON channels, may take some time...\n",
164      "2016-11-17 17:01:07,184 DEBUG   : Discovering available HWMON sensors...\n",
165      "2016-11-17 17:01:07,185 DEBUG   : \tAdding sensor scpi_sensors/energy1\n",
166      "2016-11-17 17:01:07,186 DEBUG   : \tAdding sensor scpi_sensors/energy2\n",
167      "2016-11-17 17:01:07,187 DEBUG   : \tAdding sensor scpi_sensors/energy3\n",
168      "2016-11-17 17:01:07,188 DEBUG   : \tAdding sensor scpi_sensors/energy4\n",
169      "2016-11-17 17:01:07,189 DEBUG   : \tAdding sensor scpi_sensors/curr1\n",
170      "2016-11-17 17:01:07,191 DEBUG   : \tAdding sensor scpi_sensors/curr2\n",
171      "2016-11-17 17:01:07,192 DEBUG   : \tAdding sensor scpi_sensors/curr3\n",
172      "2016-11-17 17:01:07,193 DEBUG   : \tAdding sensor scpi_sensors/curr4\n",
173      "2016-11-17 17:01:07,194 DEBUG   : \tAdding sensor scpi_sensors/temp1\n",
174      "2016-11-17 17:01:07,195 DEBUG   : \tAdding sensor scpi_sensors/temp2\n",
175      "2016-11-17 17:01:07,196 DEBUG   : \tAdding sensor scpi_sensors/power1\n",
176      "2016-11-17 17:01:07,198 DEBUG   : \tAdding sensor scpi_sensors/power2\n",
177      "2016-11-17 17:01:07,199 DEBUG   : \tAdding sensor scpi_sensors/power3\n",
178      "2016-11-17 17:01:07,200 DEBUG   : \tAdding sensor scpi_sensors/power4\n",
179      "2016-11-17 17:01:07,201 DEBUG   : \tAdding sensor scpi_sensors/in0\n",
180      "2016-11-17 17:01:07,202 DEBUG   : \tAdding sensor scpi_sensors/in1\n",
181      "2016-11-17 17:01:07,203 DEBUG   : \tAdding sensor scpi_sensors/in2\n",
182      "2016-11-17 17:01:07,204 DEBUG   : \tAdding sensor scpi_sensors/in3\n",
183      "2016-11-17 17:01:07,205 DEBUG   : \tAdding sensor scpi_sensors/in4\n",
184      "2016-11-17 17:01:07,206 DEBUG   : \tAdding sensor scpi_sensors/in5\n",
185      "2016-11-17 17:01:07,206 DEBUG   : \tAdding sensor scpi_sensors/in6\n",
186      "2016-11-17 17:01:07,207 DEBUG   :          HWMon - Enabling channels {'kinds': ['energy'], 'sites': ['BOARDLITTLE', 'BOARDBIG']}\n",
187      "2016-11-17 17:01:07,208 INFO    :          HWMon - Channels selected for energy sampling:\n",
188      "2016-11-17 17:01:07,209 INFO    :          HWMon -    BOARDBIG_energy\n",
189      "2016-11-17 17:01:07,210 INFO    :          HWMon -    BOARDLITTLE_energy\n",
190      "2016-11-17 17:01:07,211 DEBUG   :    EnergyMeter - Results dir: /home/bjackman/sources/lisa/results/ExecutorExample\n",
191      "2016-11-17 17:01:07,212 INFO    :        TestEnv - Set results folder to:\n",
192      "2016-11-17 17:01:07,213 INFO    :        TestEnv -    /home/bjackman/sources/lisa/results/ExecutorExample\n",
193      "2016-11-17 17:01:07,214 INFO    :        TestEnv - Experiment results available also in:\n",
194      "2016-11-17 17:01:07,215 INFO    :        TestEnv -    /home/bjackman/sources/lisa/results_latest\n"
195     ]
196    }
197   ],
198   "source": [
199    "from env import TestEnv\n",
200    "\n",
201    "# Setup a test environment with target configuration\n",
202    "env = TestEnv({\n",
203    "    \n",
204    "    # Target platform and board\n",
205    "    \"platform\"    : 'linux',\n",
206    "    \"board\"       : 'juno',\n",
207    "    \n",
208    "    # Target board IP/MAC address\n",
209    "    \"host\"        : '192.168.0.1',\n",
210    "    \n",
211    "    # Login credentials\n",
212    "    \"username\"    : 'root',\n",
213    "    \"password\"    : 'test0000',\n",
214    "\n",
215    "    # Folder where all the results will be collected\n",
216    "    \"results_dir\" : \"ExecutorExample\",\n",
217    "            \n",
218    "    # FTrace events to collect for all the tests configuration which have\n",
219    "    # the \"ftrace\" flag enabled\n",
220    "    \"ftrace\"  : {\n",
221    "         \"events\" : [\n",
222    "            \"sched_switch\",\n",
223    "            \"sched_wakeup\",\n",
224    "            \"sched_wakeup_new\",\n",
225    "            \"cpu_frequency\",\n",
226    "         ],\n",
227    "         \"buffsize\" : 80 * 1024,\n",
228    "    },\n",
229    "    \n",
230    "    # Tools required by the experiments\n",
231    "    \"tools\"   : [ 'trace-cmd', 'perf' ],\n",
232    "    \n",
233    "    # Modules required by these experiments\n",
234    "    \"modules\"     : [ 'bl', 'cpufreq' ],\n",
235    "})"
236   ]
237  },
238  {
239   "cell_type": "markdown",
240   "metadata": {},
241   "source": [
242    "# Tests Configuration"
243   ]
244  },
245  {
246   "cell_type": "code",
247   "execution_count": 4,
248   "metadata": {
249    "collapsed": false,
250    "scrolled": false
251   },
252   "outputs": [],
253   "source": [
254    "my_tests_conf = {\n",
255    "\n",
256    "    # Platform configurations to test\n",
257    "    \"confs\" : [\n",
258    "        {\n",
259    "            \"tag\"            : \"base\",\n",
260    "            \"flags\"          : \"ftrace\",           # Enable FTrace events\n",
261    "            \"sched_features\" : \"NO_ENERGY_AWARE\",  # Disable EAS\n",
262    "            \"cpufreq\"        : {                   # Use PERFORMANCE CpuFreq\n",
263    "                \"governor\" : \"performance\",\n",
264    "            },\n",
265    "        },\n",
266    "        {\n",
267    "            \"tag\"            : \"eas\",\n",
268    "            \"flags\"          : \"ftrace\",           # Enable FTrace events\n",
269    "            \"sched_features\" : \"ENERGY_AWARE\",     # Enable EAS\n",
270    "            \"cpufreq\"        : {                   # Use PERFORMANCE CpuFreq\n",
271    "                \"governor\" : \"performance\",\n",
272    "            },\n",
273    "        },\n",
274    "    ],\n",
275    "    \n",
276    "    # Workloads to run (on each platform configuration)\n",
277    "    \"wloads\" : {\n",
278    "        # Run hackbench with 1 group using pipes\n",
279    "        \"perf\" : {\n",
280    "            \"type\" : \"perf_bench\",\n",
281    "            \"conf\" : {\n",
282    "                \"class\" : \"messaging\",\n",
283    "                \"params\" : {\n",
284    "                    \"group\" :    1,\n",
285    "                    \"loop\"  :   10,\n",
286    "                    \"pipe\"  : True,\n",
287    "                    \"thread\": True,\n",
288    "                }\n",
289    "            }\n",
290    "        },\n",
291    "        # Run a 20% duty-cycle periodic task\n",
292    "        \"rta\" : {\n",
293    "            \"type\" : \"rt-app\",\n",
294    "            \"loadref\" : \"big\",\n",
295    "            \"conf\" : {\n",
296    "                \"class\"  : \"profile\",\n",
297    "                \"params\"  : {\n",
298    "                    \"p20\" : {\n",
299    "                        \"kind\"   : \"Periodic\",\n",
300    "                        \"params\" : {\n",
301    "                            \"duty_cycle_pct\" : 20,\n",
302    "                         },\n",
303    "                    },\n",
304    "                },\n",
305    "            },\n",
306    "        },\n",
307    "    },\n",
308    "    \n",
309    "    # Number of iterations for each workload\n",
310    "    \"iterations\" : 1,\n",
311    "}"
312   ]
313  },
314  {
315   "cell_type": "markdown",
316   "metadata": {},
317   "source": [
318    "# Tests execution"
319   ]
320  },
321  {
322   "cell_type": "code",
323   "execution_count": 5,
324   "metadata": {
325    "collapsed": false
326   },
327   "outputs": [
328    {
329     "name": "stderr",
330     "output_type": "stream",
331     "text": [
332      "05:01:07  INFO    :         Target - Loading custom (inline) test configuration\n",
333      "05:01:07  INFO    : \n",
334      "05:01:07  INFO    : ################################################################################\n",
335      "05:01:07  INFO    :       Executor - Experiments configuration\n",
336      "05:01:07  INFO    : ################################################################################\n",
337      "05:01:07  INFO    :       Executor - Configured to run:\n",
338      "05:01:07  INFO    :       Executor -     2 target configurations:\n",
339      "05:01:07  INFO    :       Executor -       base, eas\n",
340      "05:01:07  INFO    :       Executor -     2 workloads (1 iterations each)\n",
341      "05:01:07  INFO    :       Executor -       rta, perf\n",
342      "05:01:07  INFO    :       Executor - Total: 4 experiments\n",
343      "05:01:07  INFO    :       Executor - Results will be collected under:\n",
344      "05:01:07  INFO    :       Executor -       /home/bjackman/sources/lisa/results/ExecutorExample\n"
345     ]
346    }
347   ],
348   "source": [
349    "from executor import Executor\n",
350    "\n",
351    "executor = Executor(env, my_tests_conf)"
352   ]
353  },
354  {
355   "cell_type": "code",
356   "execution_count": 6,
357   "metadata": {
358    "collapsed": false,
359    "scrolled": true
360   },
361   "outputs": [
362    {
363     "name": "stderr",
364     "output_type": "stream",
365     "text": [
366      "05:01:07  INFO    : \n",
367      "05:01:07  INFO    : ################################################################################\n",
368      "05:01:07  INFO    :       Executor - Experiments execution\n",
369      "05:01:07  INFO    : ################################################################################\n",
370      "05:01:07  INFO    : \n",
371      "05:01:07  INFO    : ================================================================================\n",
372      "05:01:07  INFO    :   TargetConfig - configuring target for [base] experiments\n",
373      "2016-11-17 17:01:07,401 DEBUG   : sudo -- sh -c '[ -d /home/brendan/devlib-target/run_dir ] || mkdir /home/brendan/devlib-target/run_dir'\n",
374      "2016-11-17 17:01:08,306 DEBUG   : sudo -- sh -c 'grep schedtest /proc/mounts ||   mount -t tmpfs -o size=1024m schedtest /home/brendan/devlib-target/run_dir'\n",
375      "05:01:09  INFO    :  SchedFeatures - Set scheduler feature: NO_ENERGY_AWARE\n",
376      "2016-11-17 17:01:09,212 DEBUG   : sudo -- sh -c 'echo NO_ENERGY_AWARE > /sys/kernel/debug/sched_features'\n",
377      "05:01:10  INFO    :        CPUFreq - Configuring all CPUs to use [performance] governor\n",
378      "2016-11-17 17:01:10,118 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_set_all_governors performance'\n",
379      "05:01:10  INFO    :          WlGen - Setup new workload rta\n",
380      "05:01:10  INFO    :          RTApp - Workload duration defined by longest task\n",
381      "05:01:10  INFO    :          RTApp - Default policy: SCHED_OTHER\n",
382      "05:01:10  INFO    :          RTApp - ------------------------\n",
383      "05:01:10  INFO    :          RTApp - task [task_p200], sched: using default policy\n",
384      "05:01:10  INFO    :          RTApp -  | calibration CPU: 1\n",
385      "05:01:10  INFO    :          RTApp -  | loops count: 1\n",
386      "05:01:10  INFO    :          RTApp - + phase_000001: duration 1.000000 [s] (10 loops)\n",
387      "05:01:10  INFO    :          RTApp - |  period   100000 [us], duty_cycle  20 %\n",
388      "05:01:10  INFO    :          RTApp - |  run_time  20000 [us], sleep_time  80000 [us]\n",
389      "2016-11-17 17:01:10,934 DEBUG   : /usr/bin/scp -r   rta_00.json brendan@192.168.0.1:/home/brendan/devlib-target/run_dir\n",
390      "2016-11-17 17:01:11,184 DEBUG   : zcat /proc/config.gz\n",
391      "2016-11-17 17:01:11,706 DEBUG   : /home/brendan/devlib-target/bin/busybox uname -a\n",
392      "05:01:12  INFO    :          WlGen - Setup new workload perf\n",
393      "2016-11-17 17:01:12,149 DEBUG   : /home/brendan/devlib-target/bin/busybox uname -a\n",
394      "05:01:12  INFO    : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
395      "05:01:12  INFO    :       Executor - Experiment 0/4, [base:rta] 1/1\n",
396      "05:01:12  WARNING :       Executor - FTrace events collection enabled\n",
397      "2016-11-17 17:01:12,569 DEBUG   : sudo -- sh -c 'echo 81920 > '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
398      "2016-11-17 17:01:13,272 DEBUG   : sudo -- sh -c 'cat '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
399      "2016-11-17 17:01:14,178 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd reset'\n",
400      "2016-11-17 17:01:15,707 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd start -e sched_switch -e sched_wakeup -e sched_wakeup_new -e cpu_frequency'\n",
401      "2016-11-17 17:01:17,247 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_START > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
402      "2016-11-17 17:01:17,850 DEBUG   : Trace CPUFreq frequencies\n",
403      "2016-11-17 17:01:17,951 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
404      "2016-11-17 17:01:18,857 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
405      "2016-11-17 17:01:19,762 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
406      "05:01:20  INFO    :          WlGen - Workload execution START:\n",
407      "05:01:20  INFO    :          WlGen -    /home/brendan/devlib-target/bin/rt-app /home/brendan/devlib-target/run_dir/rta_00.json 2>&1\n",
408      "2016-11-17 17:01:20,671 DEBUG   : /home/brendan/devlib-target/bin/rt-app /home/brendan/devlib-target/run_dir/rta_00.json 2>&1\n",
409      "2016-11-17 17:01:22,087 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:'/home/brendan/devlib-target/run_dir/*task_p200*.log' /home/bjackman/sources/lisa/results/ExecutorExample/rtapp:base:rta/1\n",
410      "2016-11-17 17:01:22,240 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:/home/brendan/devlib-target/run_dir/rta_00.json /home/bjackman/sources/lisa/results/ExecutorExample/rtapp:base:rta/1\n",
411      "2016-11-17 17:01:22,493 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
412      "2016-11-17 17:01:23,400 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
413      "2016-11-17 17:01:24,205 DEBUG   : Trace CPUFreq frequencies\n",
414      "2016-11-17 17:01:24,307 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
415      "2016-11-17 17:01:25,213 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_STOP > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
416      "2016-11-17 17:01:25,915 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd stop'\n",
417      "2016-11-17 17:01:26,821 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd extract -o /home/brendan/devlib-target/trace.dat'\n",
418      "2016-11-17 17:01:28,593 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:/home/brendan/devlib-target/trace.dat /home/bjackman/sources/lisa/results/ExecutorExample/rtapp:base:rta/1/trace.dat\n",
419      "05:01:35  INFO    :       Executor - Collected FTrace binary trace:\n",
420      "05:01:35  INFO    :       Executor -    <res_dir>/rtapp:base:rta/1/trace.dat\n",
421      "05:01:35  INFO    :       Executor - Collected FTrace function profiling:\n",
422      "05:01:35  INFO    :       Executor -    <res_dir>/rtapp:base:rta/1/trace_stat.json\n",
423      "05:01:35  INFO    : --------------------------------------------------------------------------------\n",
424      "05:01:35  INFO    : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
425      "05:01:35  INFO    :       Executor - Experiment 1/4, [base:perf] 1/1\n",
426      "05:01:35  WARNING :       Executor - FTrace events collection enabled\n",
427      "2016-11-17 17:01:35,737 DEBUG   : sudo -- sh -c 'echo 81920 > '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
428      "2016-11-17 17:01:36,440 DEBUG   : sudo -- sh -c 'cat '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
429      "2016-11-17 17:01:37,346 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd reset'\n",
430      "2016-11-17 17:01:38,888 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd start -e sched_switch -e sched_wakeup -e sched_wakeup_new -e cpu_frequency'\n",
431      "2016-11-17 17:01:40,434 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_START > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
432      "2016-11-17 17:01:41,037 DEBUG   : Trace CPUFreq frequencies\n",
433      "2016-11-17 17:01:41,139 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
434      "2016-11-17 17:01:42,045 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
435      "2016-11-17 17:01:42,951 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
436      "05:01:43  INFO    :          WlGen - Workload execution START:\n",
437      "05:01:43  INFO    :          WlGen -    /home/brendan/devlib-target/bin/perf bench sched messaging --pipe --thread --group 1 --loop 10\n",
438      "2016-11-17 17:01:43,859 DEBUG   : /home/brendan/devlib-target/bin/perf bench sched messaging --pipe --thread --group 1 --loop 10\n",
439      "05:01:44  INFO    :      PerfBench - Completion time: 0.012000, Performance 83.333333\n",
440      "2016-11-17 17:01:44,284 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
441      "2016-11-17 17:01:45,190 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
442      "2016-11-17 17:01:45,995 DEBUG   : Trace CPUFreq frequencies\n",
443      "2016-11-17 17:01:46,097 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
444      "2016-11-17 17:01:47,003 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_STOP > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
445      "2016-11-17 17:01:49,258 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd stop'\n",
446      "2016-11-17 17:01:50,164 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd extract -o /home/brendan/devlib-target/trace.dat'\n",
447      "2016-11-17 17:01:51,947 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:/home/brendan/devlib-target/trace.dat /home/bjackman/sources/lisa/results/ExecutorExample/perf_bench_messaging:base:perf/1/trace.dat\n",
448      "05:01:52  INFO    :       Executor - Collected FTrace binary trace:\n",
449      "05:01:52  INFO    :       Executor -    <res_dir>/perf_bench_messaging:base:perf/1/trace.dat\n",
450      "05:01:52  INFO    :       Executor - Collected FTrace function profiling:\n",
451      "05:01:52  INFO    :       Executor -    <res_dir>/perf_bench_messaging:base:perf/1/trace_stat.json\n",
452      "05:01:52  INFO    : --------------------------------------------------------------------------------\n",
453      "05:01:52  INFO    : \n",
454      "05:01:52  INFO    : ================================================================================\n",
455      "05:01:52  INFO    :   TargetConfig - configuring target for [eas] experiments\n",
456      "2016-11-17 17:01:52,740 DEBUG   : sudo -- sh -c '[ -d /home/brendan/devlib-target/run_dir ] || mkdir /home/brendan/devlib-target/run_dir'\n",
457      "2016-11-17 17:01:53,646 DEBUG   : sudo -- sh -c 'grep schedtest /proc/mounts ||   mount -t tmpfs -o size=1024m schedtest /home/brendan/devlib-target/run_dir'\n",
458      "05:01:54  INFO    :  SchedFeatures - Set scheduler feature: ENERGY_AWARE\n",
459      "2016-11-17 17:01:54,552 DEBUG   : sudo -- sh -c 'echo ENERGY_AWARE > /sys/kernel/debug/sched_features'\n",
460      "05:01:55  INFO    :        CPUFreq - Configuring all CPUs to use [performance] governor\n",
461      "2016-11-17 17:01:55,460 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_set_all_governors performance'\n",
462      "05:01:56  INFO    :          WlGen - Setup new workload rta\n",
463      "05:01:56  INFO    :          RTApp - Workload duration defined by longest task\n",
464      "05:01:56  INFO    :          RTApp - Default policy: SCHED_OTHER\n",
465      "05:01:56  INFO    :          RTApp - ------------------------\n",
466      "05:01:56  INFO    :          RTApp - task [task_p200], sched: using default policy\n",
467      "05:01:56  INFO    :          RTApp -  | calibration CPU: 1\n",
468      "05:01:56  INFO    :          RTApp -  | loops count: 1\n",
469      "05:01:56  INFO    :          RTApp - + phase_000001: duration 1.000000 [s] (10 loops)\n",
470      "05:01:56  INFO    :          RTApp - |  period   100000 [us], duty_cycle  20 %\n",
471      "05:01:56  INFO    :          RTApp - |  run_time  20000 [us], sleep_time  80000 [us]\n",
472      "2016-11-17 17:01:56,276 DEBUG   : /usr/bin/scp -r   rta_00.json brendan@192.168.0.1:/home/brendan/devlib-target/run_dir\n",
473      "2016-11-17 17:01:56,579 DEBUG   : /home/brendan/devlib-target/bin/busybox uname -a\n",
474      "05:01:56  INFO    :          WlGen - Setup new workload perf\n",
475      "2016-11-17 17:01:57,022 DEBUG   : /home/brendan/devlib-target/bin/busybox uname -a\n",
476      "05:01:57  INFO    : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
477      "05:01:57  INFO    :       Executor - Experiment 0/4, [base:rta] 1/1\n",
478      "05:01:57  WARNING :       Executor - FTrace events collection enabled\n",
479      "2016-11-17 17:01:57,442 DEBUG   : sudo -- sh -c 'echo 81920 > '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
480      "2016-11-17 17:01:58,146 DEBUG   : sudo -- sh -c 'cat '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
481      "2016-11-17 17:01:59,052 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd reset'\n",
482      "2016-11-17 17:02:00,818 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd start -e sched_switch -e sched_wakeup -e sched_wakeup_new -e cpu_frequency'\n",
483      "2016-11-17 17:02:02,450 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_START > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
484      "2016-11-17 17:02:03,052 DEBUG   : Trace CPUFreq frequencies\n",
485      "2016-11-17 17:02:03,154 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
486      "2016-11-17 17:02:04,061 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
487      "2016-11-17 17:02:04,967 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
488      "05:02:05  INFO    :          WlGen - Workload execution START:\n",
489      "05:02:05  INFO    :          WlGen -    /home/brendan/devlib-target/bin/rt-app /home/brendan/devlib-target/run_dir/rta_00.json 2>&1\n",
490      "2016-11-17 17:02:05,875 DEBUG   : /home/brendan/devlib-target/bin/rt-app /home/brendan/devlib-target/run_dir/rta_00.json 2>&1\n",
491      "2016-11-17 17:02:07,294 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:'/home/brendan/devlib-target/run_dir/*task_p200*.log' /home/bjackman/sources/lisa/results/ExecutorExample/rtapp:base:rta/1\n",
492      "2016-11-17 17:02:07,464 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:/home/brendan/devlib-target/run_dir/rta_00.json /home/bjackman/sources/lisa/results/ExecutorExample/rtapp:base:rta/1\n",
493      "2016-11-17 17:02:07,734 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
494      "2016-11-17 17:02:08,640 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
495      "2016-11-17 17:02:09,446 DEBUG   : Trace CPUFreq frequencies\n",
496      "2016-11-17 17:02:09,548 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
497      "2016-11-17 17:02:10,453 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_STOP > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
498      "2016-11-17 17:02:11,156 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd stop'\n",
499      "2016-11-17 17:02:12,062 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd extract -o /home/brendan/devlib-target/trace.dat'\n",
500      "2016-11-17 17:02:14,012 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:/home/brendan/devlib-target/trace.dat /home/bjackman/sources/lisa/results/ExecutorExample/rtapp:base:rta/1/trace.dat\n",
501      "05:02:14  INFO    :       Executor - Collected FTrace binary trace:\n",
502      "05:02:14  INFO    :       Executor -    <res_dir>/rtapp:base:rta/1/trace.dat\n",
503      "05:02:14  INFO    :       Executor - Collected FTrace function profiling:\n",
504      "05:02:14  INFO    :       Executor -    <res_dir>/rtapp:base:rta/1/trace_stat.json\n",
505      "05:02:14  INFO    : --------------------------------------------------------------------------------\n",
506      "05:02:14  INFO    : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
507      "05:02:14  INFO    :       Executor - Experiment 1/4, [base:perf] 1/1\n",
508      "05:02:14  WARNING :       Executor - FTrace events collection enabled\n",
509      "2016-11-17 17:02:14,771 DEBUG   : sudo -- sh -c 'echo 81920 > '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
510      "2016-11-17 17:02:15,473 DEBUG   : sudo -- sh -c 'cat '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
511      "2016-11-17 17:02:16,379 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd reset'\n",
512      "2016-11-17 17:02:18,021 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd start -e sched_switch -e sched_wakeup -e sched_wakeup_new -e cpu_frequency'\n",
513      "2016-11-17 17:02:19,703 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_START > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
514      "2016-11-17 17:02:20,305 DEBUG   : Trace CPUFreq frequencies\n",
515      "2016-11-17 17:02:20,407 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
516      "2016-11-17 17:02:21,313 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
517      "2016-11-17 17:02:22,219 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
518      "05:02:23  INFO    :          WlGen - Workload execution START:\n",
519      "05:02:23  INFO    :          WlGen -    /home/brendan/devlib-target/bin/perf bench sched messaging --pipe --thread --group 1 --loop 10\n",
520      "2016-11-17 17:02:23,127 DEBUG   : /home/brendan/devlib-target/bin/perf bench sched messaging --pipe --thread --group 1 --loop 10\n",
521      "05:02:23  INFO    :      PerfBench - Completion time: 0.080000, Performance 12.500000\n",
522      "2016-11-17 17:02:23,628 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
523      "2016-11-17 17:02:24,534 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
524      "2016-11-17 17:02:25,340 DEBUG   : Trace CPUFreq frequencies\n",
525      "2016-11-17 17:02:25,442 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
526      "2016-11-17 17:02:26,347 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_STOP > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
527      "2016-11-17 17:02:27,050 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd stop'\n",
528      "2016-11-17 17:02:27,956 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd extract -o /home/brendan/devlib-target/trace.dat'\n",
529      "2016-11-17 17:02:30,090 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:/home/brendan/devlib-target/trace.dat /home/bjackman/sources/lisa/results/ExecutorExample/perf_bench_messaging:base:perf/1/trace.dat\n",
530      "05:02:30  INFO    :       Executor - Collected FTrace binary trace:\n",
531      "05:02:30  INFO    :       Executor -    <res_dir>/perf_bench_messaging:base:perf/1/trace.dat\n",
532      "05:02:30  INFO    :       Executor - Collected FTrace function profiling:\n",
533      "05:02:30  INFO    :       Executor -    <res_dir>/perf_bench_messaging:base:perf/1/trace_stat.json\n",
534      "05:02:30  INFO    : --------------------------------------------------------------------------------\n",
535      "05:02:30  INFO    : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
536      "05:02:30  INFO    :       Executor - Experiment 2/4, [eas:rta] 1/1\n",
537      "05:02:30  WARNING :       Executor - FTrace events collection enabled\n",
538      "2016-11-17 17:02:30,869 DEBUG   : sudo -- sh -c 'echo 81920 > '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
539      "2016-11-17 17:02:31,572 DEBUG   : sudo -- sh -c 'cat '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
540      "2016-11-17 17:02:32,478 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd reset'\n",
541      "2016-11-17 17:02:34,271 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd start -e sched_switch -e sched_wakeup -e sched_wakeup_new -e cpu_frequency'\n",
542      "2016-11-17 17:02:35,963 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_START > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
543      "2016-11-17 17:02:36,565 DEBUG   : Trace CPUFreq frequencies\n",
544      "2016-11-17 17:02:36,667 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
545      "2016-11-17 17:02:37,573 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
546      "2016-11-17 17:02:38,479 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
547      "05:02:39  INFO    :          WlGen - Workload execution START:\n",
548      "05:02:39  INFO    :          WlGen -    /home/brendan/devlib-target/bin/rt-app /home/brendan/devlib-target/run_dir/rta_00.json 2>&1\n",
549      "2016-11-17 17:02:39,387 DEBUG   : /home/brendan/devlib-target/bin/rt-app /home/brendan/devlib-target/run_dir/rta_00.json 2>&1\n",
550      "2016-11-17 17:02:40,807 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:'/home/brendan/devlib-target/run_dir/*task_p200*.log' /home/bjackman/sources/lisa/results/ExecutorExample/rtapp:eas:rta/1\n",
551      "2016-11-17 17:02:40,980 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:/home/brendan/devlib-target/run_dir/rta_00.json /home/bjackman/sources/lisa/results/ExecutorExample/rtapp:eas:rta/1\n",
552      "2016-11-17 17:02:41,231 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
553      "2016-11-17 17:02:42,137 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
554      "2016-11-17 17:02:42,943 DEBUG   : Trace CPUFreq frequencies\n",
555      "2016-11-17 17:02:43,045 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
556      "2016-11-17 17:02:43,950 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_STOP > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
557      "2016-11-17 17:02:44,653 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd stop'\n",
558      "2016-11-17 17:02:45,559 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd extract -o /home/brendan/devlib-target/trace.dat'\n",
559      "2016-11-17 17:02:47,519 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:/home/brendan/devlib-target/trace.dat /home/bjackman/sources/lisa/results/ExecutorExample/rtapp:eas:rta/1/trace.dat\n",
560      "05:02:48  INFO    :       Executor - Collected FTrace binary trace:\n",
561      "05:02:48  INFO    :       Executor -    <res_dir>/rtapp:eas:rta/1/trace.dat\n",
562      "05:02:48  INFO    :       Executor - Collected FTrace function profiling:\n",
563      "05:02:48  INFO    :       Executor -    <res_dir>/rtapp:eas:rta/1/trace_stat.json\n",
564      "05:02:48  INFO    : --------------------------------------------------------------------------------\n",
565      "05:02:48  INFO    : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
566      "05:02:48  INFO    :       Executor - Experiment 3/4, [eas:perf] 1/1\n",
567      "05:02:48  WARNING :       Executor - FTrace events collection enabled\n",
568      "2016-11-17 17:02:48,276 DEBUG   : sudo -- sh -c 'echo 81920 > '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
569      "2016-11-17 17:02:48,979 DEBUG   : sudo -- sh -c 'cat '\\''/sys/kernel/debug/tracing/buffer_size_kb'\\'''\n",
570      "2016-11-17 17:02:49,885 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd reset'\n",
571      "2016-11-17 17:02:51,485 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd start -e sched_switch -e sched_wakeup -e sched_wakeup_new -e cpu_frequency'\n",
572      "2016-11-17 17:02:53,160 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_START > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
573      "2016-11-17 17:02:53,763 DEBUG   : Trace CPUFreq frequencies\n",
574      "2016-11-17 17:02:53,865 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
575      "2016-11-17 17:02:54,771 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
576      "2016-11-17 17:02:55,676 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
577      "05:02:56  INFO    :          WlGen - Workload execution START:\n",
578      "05:02:56  INFO    :          WlGen -    /home/brendan/devlib-target/bin/perf bench sched messaging --pipe --thread --group 1 --loop 10\n",
579      "2016-11-17 17:02:56,585 DEBUG   : /home/brendan/devlib-target/bin/perf bench sched messaging --pipe --thread --group 1 --loop 10\n",
580      "05:02:56  INFO    :      PerfBench - Completion time: 0.083000, Performance 12.048193\n",
581      "2016-11-17 17:02:57,088 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy2_input'\\'''\n",
582      "2016-11-17 17:02:57,994 DEBUG   : sudo -- sh -c 'cat '\\''/sys/class/hwmon/hwmon0/energy3_input'\\'''\n",
583      "2016-11-17 17:02:58,799 DEBUG   : Trace CPUFreq frequencies\n",
584      "2016-11-17 17:02:58,901 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/shutils cpufreq_trace_all_frequencies'\n",
585      "2016-11-17 17:02:59,807 DEBUG   : sudo -- sh -c 'echo TRACE_MARKER_STOP > '\\''/sys/kernel/debug/tracing/trace_marker'\\'''\n",
586      "2016-11-17 17:03:00,510 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd stop'\n",
587      "2016-11-17 17:03:01,415 DEBUG   : sudo -- sh -c '/home/brendan/devlib-target/bin/trace-cmd extract -o /home/brendan/devlib-target/trace.dat'\n",
588      "2016-11-17 17:03:03,385 DEBUG   : /usr/bin/scp -r   brendan@192.168.0.1:/home/brendan/devlib-target/trace.dat /home/bjackman/sources/lisa/results/ExecutorExample/perf_bench_messaging:eas:perf/1/trace.dat\n",
589      "05:03:04  INFO    :       Executor - Collected FTrace binary trace:\n",
590      "05:03:04  INFO    :       Executor -    <res_dir>/perf_bench_messaging:eas:perf/1/trace.dat\n",
591      "05:03:04  INFO    :       Executor - Collected FTrace function profiling:\n",
592      "05:03:04  INFO    :       Executor -    <res_dir>/perf_bench_messaging:eas:perf/1/trace_stat.json\n",
593      "05:03:04  INFO    : --------------------------------------------------------------------------------\n",
594      "05:03:04  INFO    : \n",
595      "05:03:04  INFO    : ################################################################################\n",
596      "05:03:04  INFO    :       Executor - Experiments execution completed\n",
597      "05:03:04  INFO    : ################################################################################\n",
598      "05:03:04  INFO    :       Executor - Results available in:\n",
599      "05:03:04  INFO    :       Executor -       /home/bjackman/sources/lisa/results/ExecutorExample\n"
600     ]
601    }
602   ],
603   "source": [
604    "executor.run()"
605   ]
606  },
607  {
608   "cell_type": "code",
609   "execution_count": 7,
610   "metadata": {
611    "collapsed": false
612   },
613   "outputs": [
614    {
615     "name": "stdout",
616     "output_type": "stream",
617     "text": [
618      "\u001b[01;34m/home/bjackman/sources/lisa/results/ExecutorExample\u001b[00m\r\n",
619      "├── \u001b[01;34mperf_bench_messaging:base:perf\u001b[00m\r\n",
620      "│   ├── \u001b[01;34m1\u001b[00m\r\n",
621      "│   │   ├── energy.json\r\n",
622      "│   │   ├── output.log\r\n",
623      "│   │   ├── performance.json\r\n",
624      "│   │   └── trace.dat\r\n",
625      "│   ├── kernel.config\r\n",
626      "│   ├── kernel.version\r\n",
627      "│   └── platform.json\r\n",
628      "├── \u001b[01;34mperf_bench_messaging:eas:perf\u001b[00m\r\n",
629      "│   ├── \u001b[01;34m1\u001b[00m\r\n",
630      "│   │   ├── energy.json\r\n",
631      "│   │   ├── output.log\r\n",
632      "│   │   ├── performance.json\r\n",
633      "│   │   └── trace.dat\r\n",
634      "│   ├── kernel.config\r\n",
635      "│   ├── kernel.version\r\n",
636      "│   └── platform.json\r\n",
637      "├── \u001b[01;34mrtapp:base:rta\u001b[00m\r\n",
638      "│   ├── \u001b[01;34m1\u001b[00m\r\n",
639      "│   │   ├── energy.json\r\n",
640      "│   │   ├── output.log\r\n",
641      "│   │   ├── rta_00.json\r\n",
642      "│   │   ├── rt-app-task_p200-0.log\r\n",
643      "│   │   └── trace.dat\r\n",
644      "│   ├── kernel.config\r\n",
645      "│   ├── kernel.version\r\n",
646      "│   └── platform.json\r\n",
647      "└── \u001b[01;34mrtapp:eas:rta\u001b[00m\r\n",
648      "    ├── \u001b[01;34m1\u001b[00m\r\n",
649      "    │   ├── energy.json\r\n",
650      "    │   ├── output.log\r\n",
651      "    │   ├── rta_00.json\r\n",
652      "    │   ├── rt-app-task_p200-0.log\r\n",
653      "    │   └── trace.dat\r\n",
654      "    ├── kernel.config\r\n",
655      "    ├── kernel.version\r\n",
656      "    └── platform.json\r\n",
657      "\r\n",
658      "8 directories, 30 files\r\n"
659     ]
660    }
661   ],
662   "source": [
663    "!tree {executor.te.res_dir}"
664   ]
665  }
666 ],
667 "metadata": {
668  "kernelspec": {
669   "display_name": "Python 2",
670   "language": "python",
671   "name": "python2"
672  },
673  "language_info": {
674   "codemirror_mode": {
675    "name": "ipython",
676    "version": 2
677   },
678   "file_extension": ".py",
679   "mimetype": "text/x-python",
680   "name": "python",
681   "nbconvert_exporter": "python",
682   "pygments_lexer": "ipython2",
683   "version": "2.7.6"
684  }
685 },
686 "nbformat": 4,
687 "nbformat_minor": 0
688}
689