Age | Commit message (Collapse) | Author |
|
|
|
When you try to plot a dataframe with only one index, matplotlib
complains:
---8<---
/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py:2787: UserWarning: Attempting to set identical left==right re
sults
in singular transformations; automatically expanding.
left=0.0, right=0.0
'left=%s, right=%s') % (left, right))
---8<---
Change the timestamp of the second event to make it more realistic and
make sure that the dataframe that is plotted has more than one row.
|
|
In 8da875103915 ("ftrace: fix error with only one actor") we made
ftrace.plot_allfreqs() treat the case when there's only one actor a
special case that ignored the requirement of the "ax" parameter being an
array. The documentation of plot_allfreqs() is correct: if ax is not
None, it must be an array of the same size as map_label.
Revert the change to ftrace.py and fix the test to match what the
documentation says.
|
|
|
|
Unregister events
|
|
When system has only one actor and call method trappy.summary_plots, it
will report failure "zip argument #1 must support iteration".
This failure is cause by parsing allfreqs plots. Python always pass by
value, so when there have only one actor the axis will pass by value and
it's not a array type anymore. So finally zip will report it cannot
support iteration. So in this case convert axis to array type.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
|
|
The classes registered dynamically in the tests persist across the
execution of the testsuite. That makes the testsuite sometimes fail if
a test has added a class to the sched scope and
test_ftrace_has_all_classes_scope_sched() run concurrently. Unregister
the dynamic events when the tests that register them finish.
|
|
Now that we can have traces coming from sources other than ftrace,
rename register_dynamic() and register_class() to
register_dynamic_ftrace() and register_ftrace_parser() to make it clear
that they are only available for traces coming from ftrace.
|
|
BareTrace class
Part of the functionality in FTrace is generic. In order to make the
rest of trappy less dependent on FTrace, move the generic parts to a new
BareTrace class and inherit from it.
|
|
In the past ftrace.normalize_time() accepted an arbitrary basetime
parameter. This was lost in c79eccd5370e ("run: drop get_basetime()
method") but the documentation of normalize_time() still talks about the
basetime parameter. Recover it.
|
|
Run is a very generic and inappropriate name for an object that parses
the result of ftrace into a form consumable by python. Rename it to
FTrace in preparation for its generalization.
|