Add lisa.notebook.analysis
Allow writing the following code in a notebook, to give a quick way of adding custom plots:
from lisa.trace import Trace
trace = Trace('trace.dat', events=['sched_switch'])
# Define a plot method in any cell
def plot_foo(trace, y, axis):
print('Plotting horizontal line at level: {}'.format(y))
axis.axhline(y=y)
# Just use the plot function as if it was an analysis method
trace.analysis.notebook.plot_foo(3)
Also allows easy plotting of signals that may not have a dedicated plot method already:
# This will select rows with "cpu" column == 0
trace.analysis.notebook.plot_event_field('sched_load_avg_cpu', field='util_avg', filter_columns={'cpu': 0})