ARM-software / trappy

This repository has moved to https://gitlab.arm.com/tooling/trappy
Apache License 2.0
60 stars 39 forks source link

stats/grammar: Raise helpful error when asked to parse absent events #236

Closed bjackman closed 7 years ago

bjackman commented 7 years ago

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.

bjackman commented 7 years ago

Rebased now that https://github.com/ARM-software/trappy/pull/234 is merged

bjackman commented 7 years ago

Pushed a version with the change.