<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Tutorial Goal
This tutorial aims to show how to configure and run a predefined set of
synthetic workload using the executor module provided by LISA.
Configure logging
Step1:  Target Configuration
Step2:  Tests Configuration
Step3:  Tests execution
<ASSISTANT_TASK:>
Python Code:
import logging
from conf import LisaLogging
LisaLogging.setup()
# Execute this cell to enabled executor debugging statements
logging.getLogger('Executor').setLevel(logging.DEBUG)
Explanation: Tutorial Goal
This tutorial aims to show how to configure and run a predefined set of
synthetic workload using the executor module provided by LISA.
Configure logging
End of explanation
from env import TestEnv
# Setup a test environment with target configuration
env = TestEnv({
    
    # Target platform and board
    "platform"    : 'linux',
    "board"       : 'juno',
    
    # Target board IP/MAC address
    "host"        : '192.168.0.1',
    
    # Login credentials
    "username"    : 'root',
    "password"    : 'test0000',
    # Folder where all the results will be collected
    "results_dir" : "ExecutorExample",
            
    # FTrace events to collect for all the tests configuration which have
    # the "ftrace" flag enabled
    "ftrace"  : {
         "events" : [
            "sched_switch",
            "sched_wakeup",
            "sched_wakeup_new",
            "cpu_frequency",
         ],
         "buffsize" : 80 * 1024,
    },
    
    # Tools required by the experiments
    "tools"   : [ 'trace-cmd', 'perf' ],
    
    # Modules required by these experiments
    "modules"     : [ 'bl', 'cpufreq' ],
})
Explanation: Target Configuration
End of explanation
my_tests_conf = {
    # Platform configurations to test
    "confs" : [
        {
            "tag"            : "base",
            "flags"          : "ftrace",           # Enable FTrace events
            "sched_features" : "NO_ENERGY_AWARE",  # Disable EAS
            "cpufreq"        : {                   # Use PERFORMANCE CpuFreq
                "governor" : "performance",
            },
        },
        {
            "tag"            : "eas",
            "flags"          : "ftrace",           # Enable FTrace events
            "sched_features" : "ENERGY_AWARE",     # Enable EAS
            "cpufreq"        : {                   # Use PERFORMANCE CpuFreq
                "governor" : "performance",
            },
        },
    ],
    
    # Workloads to run (on each platform configuration)
    "wloads" : {
        # Run hackbench with 1 group using pipes
        "perf" : {
            "type" : "perf_bench",
            "conf" : {
                "class" : "messaging",
                "params" : {
                    "group" :    1,
                    "loop"  :   10,
                    "pipe"  : True,
                    "thread": True,
                }
            }
        },
        # Run a 20% duty-cycle periodic task
        "rta" : {
            "type" : "rt-app",
            "loadref" : "big",
            "conf" : {
                "class"  : "profile",
                "params"  : {
                    "p20" : {
                        "kind"   : "Periodic",
                        "params" : {
                            "duty_cycle_pct" : 20,
                         },
                    },
                },
            },
        },
    },
    
    # Number of iterations for each workload
    "iterations" : 1,
}
Explanation: Tests Configuration
End of explanation
from executor import Executor
executor = Executor(env, my_tests_conf)
executor.run()
!tree {executor.te.res_dir}
Explanation: Tests execution
End of explanation
<END_TASK>