History log of /external/trappy/trappy/stats/grammar.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
21860e981bede49f9da66a9c8f1421e4f7ec73a8 10-Jan-2017 Javi Merino <merino.jav@gmail.com> Merge pull request #236 from bjackman/grammar-absent-events

stats/grammar: Raise helpful error when asked to parse absent events
fbbbd40195803d95fb4f2a2d704f3a93118c8342 05-Jan-2017 Brendan Jackman <brendan.jackman@arm.com> stats/grammar: Raise helpful error when asked to parse absent events

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.
/external/trappy/trappy/stats/grammar.py
097407c9d0aaf38d547d6b73e7ab035ddd0ec3f9 04-Jan-2017 Brendan Jackman <brendan.jackman@arm.com> stats/grammar: Raise meaningful error when asked to parse bad event

If you typo a trace event name in a call to Parser.solve, you currently get a
KeyError from trying to access the result of globals(); the stacktrace goes
through a pyparsing callback to str_to_attr via _pre_process ("""Pre-process
accessors for super-indexing""")...

Add an exception with a message to hint at what went wrong.
/external/trappy/trappy/stats/grammar.py
e81fdcb135d0325e3bc22fae0583555d20aae280 04-Jan-2017 Brendan Jackman <brendan.jackman@arm.com> Update ARM Ltd. copyright to 2017
/external/trappy/trappy/stats/grammar.py
b8a1bc23aadd60f8e7b5da64b778a99c4a38bcb1 13-Sep-2016 Javi Merino <javi.merino@arm.com> grammar: fix Parser documentation

The Parser documentation defines pvars a couple of times but it doesn't
pass it to the Parser object itself. Fix the examples so that they
handle it.

While we are at it, simplify the dictionary generation.
/external/trappy/trappy/stats/grammar.py
d2f6c2f57797495c14350fde390ba2b42318a75b 13-Jul-2016 Javi Merino <javi.merino@arm.com> grammar: apply filters to data accesses

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
/external/trappy/trappy/stats/grammar.py
657ad4ff151083a9da3cf9d4c4b2fa02f69a2190 25-Feb-2016 Kapileshwar Singh <kapileshwarsingh@gmail.com> Merge pull request #144 from JaviMerino/parse_window

Teach the Parser to apply a window to data accesses
06ae7a802e91bda1207792883c5971b898e9ed38 24-Feb-2016 Javi Merino <javi.merino@arm.com> grammar: 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.
/external/trappy/trappy/stats/grammar.py
9685115e41759ed23ea54cc86938d44248e4a2d4 24-Feb-2016 Javi Merino <javi.merino@arm.com> grammar: document the first parameter of Parser()

For completeness, document the first parameter of Parser()
/external/trappy/trappy/stats/grammar.py
53d1b06f7b442bea57696d7f37d4649db5c14c38 24-Feb-2016 Javi Merino <javi.merino@arm.com> grammar: add missing multiplication and exponentiation operators

The grammar misses three basic python operators: **, // and %. Add them
so that we can use them in tests.
/external/trappy/trappy/stats/grammar.py
4ec4aee55dbd4045cfb6a2fe099615a569ce7ff7 05-Jan-2016 Javi Merino <javi.merino@arm.com> trappy: update copyright to 2016
/external/trappy/trappy/stats/grammar.py
fecb2676b883265a98e37deff1e4764337647c16 21-Dec-2015 Javi Merino <javi.merino@arm.com> dynamic: ensure dynamic methods refer to ftrace

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.
/external/trappy/trappy/stats/grammar.py
c26a323210533d4ed3a8b4e62c33744236e3beda 11-Dec-2015 Javi Merino <javi.merino@arm.com> ftrace: rename Run to 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.
/external/trappy/trappy/stats/grammar.py
790198fb746cf43e04430c796a28f05908210d4b 10-Dec-2015 Kapileshwar Singh <kapileshwar.singh@arm.com> stats: grammar: Handle duplicate indices before super indexing

Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
/external/trappy/trappy/stats/grammar.py
154782183b402e6ad04649d98c6f3bc0ff337cca 02-Dec-2015 Kapileshwar Singh <kapileshwar.singh@arm.com> stats: Missing check for attribute presence

Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
/external/trappy/trappy/stats/grammar.py
331700d3ae8c719e18af26ae3bd38c670338e7d8 02-Dec-2015 Kapileshwar Singh <kapileshwar.singh@arm.com> stats: Incorrect scope for concatenated index in grammar

Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
/external/trappy/trappy/stats/grammar.py
6eac0612be2ca2935cd9a60e33656df39a9fc90b 27-Nov-2015 Kapileshwar Singh <kapileshwar.singh@arm.com> stats: Allow grammar to use event names

Currently to represent a data column in the grammar we need:

"trappy.sched.SchedCpuCapacity:capacity"

This is changed to use the name of the above event as follows:

"cpu_capacity:capacity"

Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
/external/trappy/trappy/stats/grammar.py
04bc04447e5ac45460b089789e9cbe0c5b44a4d4 20-Nov-2015 Kapileshwar Singh <kapileshwar.singh@arm.com> stats: Add an inspect method for data accessors

An inspect method allows the user to get information about
a TRAPpy event and the data column that is intended to be
used. The information includes event type, pivoting information
data length etc.

Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
/external/trappy/trappy/stats/grammar.py
1c1ebe6a3d4ad4292fc3d50502951b3b43bcc193 19-Nov-2015 Kapileshwar Singh <kapileshwar.singh@arm.com> stats: Use super indexing for grammar

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>
/external/trappy/trappy/stats/grammar.py
e5d36a341fa5060d208802b58a192a8a5aca9e77 19-Nov-2015 Kapileshwar Singh <kapileshwar.singh@arm.com> stats: Configurable reindexing and handling of NaNs

This patch allows the user to specify a fill method (for handling
NaNs, a method for propagating values, (pad, nearest, bfill etc.)
and the limit to which these values should be propagated

Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
/external/trappy/trappy/stats/grammar.py
ab0fb63817aebc4f745f0a8e8bf65e554f39688b 19-Nov-2015 Kapileshwar Singh <kapileshwar.singh@arm.com> stats: grammar: Remove Topology argument

There is no support currently planned for the Topology in grammar.
We can remove the argument and add it if and when it is needed

Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
/external/trappy/trappy/stats/grammar.py
547beff65583ae5c62d92f7179194b6e356281d6 08-Sep-2015 Kapileshwar Singh <kapileshwar.singh@arm.com> doc: grammar: Use Sphinx friendly docstrings

Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
/external/trappy/trappy/stats/grammar.py
003511917300b995ead6b1d59f01b522a7eb9d94 14-Aug-2015 Kapileshwar Singh <kapileshwar.singh@arm.com> stats: Use pivoting when aggregating data

Topology is used to relate two dataframes with different pivot
values

Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
/external/trappy/trappy/stats/grammar.py
4f8df61a9c96544d1eacb2fc3529e4fc4bccb55f 11-Aug-2015 Kapileshwar Singh <kapileshwar.singh@arm.com> stats: Add Equality and Inequality operators

Change-Id: I1fc774ead74a376a75ef41eee2a67db8a9ca8462
Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
/external/trappy/trappy/stats/grammar.py
435457c8af9d69383ba45e0bd7da022d967a8dea 10-Aug-2015 Javi Merino <javi.merino@arm.com> trappy: rename to trappy

Change-Id: I7e0e34c9f5565e34629683bb29ab25cf5e737088
/external/trappy/trappy/stats/grammar.py