Trigger: narrow the data_frame with the pivot before applying the filter

Some complex filters require you to look at previous values of the
data.  For example, we may want to know when a frequency is no longer
used for a given cpu.

Trigger(trace, trace.cpu_frequency, pivot="cpu",
        filters={"frequency": freq_no_longer(max_freq)}, value=-1)

freq_no_longer(max_freq) returns True if the previous frequency of this
cpu was max_freq and the current is not.  The tricky bit is "of this
cpu".  With the current implementation, all freq_no_longer() sees is the
previous value, but it doesn't know to which cpu it corresponds.

Filter the data_frame with the pivot (as we are going to end up doing
regardless) before applying the filter to avoid exposing the filter to
values that are useless to it.
2 files changed
tree: 9c72ed84fb163841468c5acc4a39a46dab3bc6a4
  1. doc/
  2. hooks/
  3. scripts/
  4. tests/
  5. trappy/
  6. .dir-locals.el
  7. .gitignore
  8. LICENSE
  9. README.md
  10. setup.cfg
  11. setup.py
README.md

trappy is a visualization tool to help analyze data generated on a device. It depends on ipython notebook and pandas. First install these dependencies if you don't have them already:

$ apt-get install ipython-notebook python-pandas

Now launch the ipython notebook server:

$ ipython notebook

This should pop up a browser. If it doesn't, open a web browser and go to http://localhost:8888/tree/

In the doc/ folder there's a 00 - Quick start which describes how to run trappy. Other notebooks in that directory describe other functions of trappy.