aboutsummaryrefslogtreecommitdiff
path: root/tests/test_ftrace.py
AgeCommit message (Collapse)Author
2017-01-04Update ARM Ltd. copyright to 2017Brendan Jackman
2016-03-08tests: avoid matplotlib warning when running the testsuiteJavi Merino
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.
2016-01-05trappy: partially revert 8da875103915Javi Merino
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.
2016-01-05trappy: update copyright to 2016Javi Merino
2016-01-05Merge pull request #119 from JaviMerino/unregister_eventsKapileshwar Singh
Unregister events
2015-12-27ftrace: fix error with only one actorLeo Yan
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>
2015-12-22tests: unregister dynamically created classes in the testsJavi Merino
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.
2015-12-22dynamic: ensure dynamic methods refer to ftraceJavi Merino
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.
2015-12-22bare_trace: abstract some of the basic FTrace functionality to a generic ↵Javi Merino
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.
2015-12-22ftrace: Learn again to normalize the time against an arbitrary basetimeJavi Merino
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.
2015-12-22ftrace: rename Run to FTraceJavi Merino
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.