<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Documentation
Documentation of many LISA modules has got a big improvement with the usage of Sphinx and the refresh of docstrings for many existing methods.
You can access documentation either interactively in Notebooks, using the standard TAB completion after a function name, or by printing it in the Notebook itsels. For example
Step1:  Energy Model Related APIs
The EnergyModel class has been added, which provides methods for describing platforms in order to estimate usage of CPU systems under various utilization scenario. The model is aware of frequency (DVFS) domains, power domains and idle states, as well as "cluster" energy.
Tests have been added that utulize the EnergyModel - see below for info about the Generic tests.
Step2:  The above example shows how the EnergyModel class can be used to find optimal task placements. Here it is shown that on ARM Juno, if the system is presented with just two small tasks, it should place them on the same CPU, not using the big CPUs (1 and 2).
Trace module
Improved profiling analysis
The trace analysis module has got a more complete support for analysis of tasks properties.
Here is an example notebook which shows the new API in use on a relatively simple example
Step3:  Public interface
Step4:  The run method is the only one which the user is required to implement to specify how to run the specific Android workload.
To create a new workload it's required to create a new module under this folder
Step5:  ... and others are on their way ;-)
API to run Android Tests
A new API has been added which allows to defined how to run an Android workload to perform a pre-defined set of experiments.
Step6:  Public interface
<ASSISTANT_TASK:>
Python Code:
from test import LisaTest
print LisaTest.__doc__
Explanation: Documentation
Documentation of many LISA modules has got a big improvement with the usage of Sphinx and the refresh of docstrings for many existing methods.
You can access documentation either interactively in Notebooks, using the standard TAB completion after a function name, or by printing it in the Notebook itsels. For example:
End of explanation
from energy_model import EnergyModel
print EnergyModel.__doc__
# juno_energy provides an instance of EnergyModel for ARM Juno platforms
from platforms.juno_energy import juno_energy
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
possible_placements = juno_energy.get_optimal_placements({'task1': 10, 'task2': 15})
fig, axs = plt.subplots(1, 4, sharey=True)
# fig.set_ylabel('Utilization')
for ax, placement in zip(axs, possible_placements):
    ax.set_ylabel('Utilization')
    ax.set_xlabel('CPU')
    pd.DataFrame(list(placement)).plot(kind='bar', figsize=(16, 2), ax=ax, legend=False)
Explanation: Energy Model Related APIs
The EnergyModel class has been added, which provides methods for describing platforms in order to estimate usage of CPU systems under various utilization scenario. The model is aware of frequency (DVFS) domains, power domains and idle states, as well as "cluster" energy.
Tests have been added that utulize the EnergyModel - see below for info about the Generic tests.
End of explanation
from android import Workload
print Workload.__doc__
Explanation: The above example shows how the EnergyModel class can be used to find optimal task placements. Here it is shown that on ARM Juno, if the system is presented with just two small tasks, it should place them on the same CPU, not using the big CPUs (1 and 2).
Trace module
Improved profiling analysis
The trace analysis module has got a more complete support for analysis of tasks properties.
Here is an example notebook which shows the new API in use on a relatively simple example:
https://gist.github.com/derkling/256256f47bc9daf4883f3cb6e356e26b
Android Support
API to run Android Workloads
A new API has been adde which allows to defined how to execute and Android workload with the additional support:
- to collect a trace across its execution
- to measure energy consumption across its execution
End of explanation
{ k:v for k,v in vars(Workload).items() if not k.startswith('_') }
Explanation: Public interface:
End of explanation
!tree $LISA_HOME/libs/utils/android/workloads
Explanation: The run method is the only one which the user is required to implement to specify how to run the specific Android workload.
To create a new workload it's required to create a new module under this folder:
libs/utils/android/workloads
Here is an enample of usage of this class to run a YouTube workload:
https://github.com/ARM-software/lisa/blob/master/libs/utils/android/workloads/youtube.py
Android Workloads
Using the Workload class, some interesting Android workloads have been already integrated:
End of explanation
from android import LisaBenchmark
print LisaBenchmark.__doc__
Explanation: ... and others are on their way ;-)
API to run Android Tests
A new API has been added which allows to defined how to run an Android workload to perform a pre-defined set of experiments.
End of explanation
{ k:v for k,v in vars(LisaBenchmark).items() if not k.startswith('_') }
Explanation: Public interface:
End of explanation
<END_TASK>