Age | Commit message (Collapse) | Author |
|
If you use the Parser to access events that Trappy understands, but that are not
present in the trace, you currently get an inscrutable exception when trying to
access `.loc[ self._window[0]:]` on the empty DataFrame in _get_data_frame.
Ideally attempting to parse absent events would just return an empty DataFrame,
but then we don't know what columns it should have. So instead let's just raise
a more helpful error saying that the event is not present.
|
|
|
|
Parser() operations happens across the whole event. While it is
possible to filter the events and add them back to the trace object with
.add_parsed_event(), it is a kludge that we could remove by bringing the
concept of filters from the plotters to here.
With this change, we can simplify this:
ftrace = trappy.FTrace(trace_fname)
sbt_dfr = ftrace.sched_boost_task.data_frame
boost_task_rtapp = sbt_dfr[sbt_dfr.comm == rta_task_name]
ftrace.add_parsed_event("boost_task_rtapp", boost_task_rtapp)
analyzer = Analyzer(ftrace, {})
analyzer.assertStatement("blah")
To:
ftrace = trappy.FTrace(trace_fname)
analyzer = Analyzer(ftrace, filters={"comm": "rta_task_name"})
analyzer.assertStatement("blah")
This fixes #145
|
|
Teach the Parser to apply a window to data accesses
|
|
Parser() operations happen across the whole trace. While it is possible
to filter traces before feeding them to Parser (e.g.
trappy.FTrace(window=(1, 2))) the truth is that sometimes you need to
parse the trace to know the window in which you want to apply the test.
Instead of forcing the user to reload the trace after calculating the
window, let Parser() know that it should operate on a small window of
trace instead.
|
|
The grammar misses three basic python operators: **, // and %. Add them
so that we can use them in tests.
|
|
Some tests only check the numeric operators and don't use the trace at
all. Simplify the test by using BareTrace instead of FTrace.
|
|
|
|
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.
|
|
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
|
|
Test the grammar API when when the signal is specified as
follows:
event_name:column
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
|
|
The current index does not unify indices from different DataFrames in a
statement it just picks up the index of the first object to be referenced
and reindexes the DataFrames encountered later in the statement using
the first encountered index.
This can lead to significant data loss if the initial dataframe has a
small or non overlapping index. In this patch, we unify the indices
before the reindexing happens.
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
|
|
Bump the check to 0.16.1
|
|
pandas follow a versioning scheme that upsets StrictVersion. For
example, the current pandas in Debian Sid is:
>>> pandas.__version__
'0.16.2.dev'
If we pass this to StrictVersion it raises a ValueError. Use
LooseVersion instead. As the docstring for LooseVersion puts it:
"Version numbering for anarchists and software realists"
|
|
The parser pivots data and creates nested columns and thus the
original column names may not be retained
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
|
|
Pivoting of the grammar aggregated data requires a reference
of the returned data from the parser's solver. This needs to
be referenced against a pivot value.
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
|
|
Change-Id: I7e0e34c9f5565e34629683bb29ab25cf5e737088
|
|
Change-Id: Ie505af7efb7526f94b1cc9e37195cbd2e0451b9d
|
|
Allow the user to pass dynamically registered classes to the
parser or alias the existing classes for readability
Change-Id: Ieeecae92c5f6f77cc8660fac7bd048e85a6576c9
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
|
|
A grammar that simplifies expressing conditions on trace data
Change-Id: Ieef36283e275a3a96ab29e198dc597a840dc0996
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
|