In [1]:
import logging
reload(logging)
log_fmt = '%(asctime)-9s %(levelname)-8s: %(message)s'
logging.basicConfig(format=log_fmt)
# Change to info once the notebook runs ok
#logging.getLogger().setLevel(logging.DEBUG)
In [2]:
%pylab inline
import datetime
import devlib
import os
import json
import pandas as pd
import re
import subprocess
import trappy
from trappy.plotter.Utils import get_trace_event_data
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
# Support to access the remote target
#import devlib
#from env import TestEnv
from executor import Executor
In [3]:
# Setup a target configuration
my_target_conf = {
# Target platform and board
"platform" : 'linux',
"board" : 'aboard',
# Target board IP/MAC address
"host" : '192.168.0.1',
# Login credentials
"username" : 'root',
"password" : 'test0000',
}
In [4]:
my_tests_conf = {
# Folder where all the results will be collected
"results_dir" : "ExecutorExample",
# 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,
# 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' ],
}
In [5]:
executor = Executor(my_target_conf, my_tests_conf)
In [6]:
executor.run()
In [7]:
!tree {executor.te.res_dir}