Clarify which events are predefined
Run(events=["thermal_temperature"]) reuses the event that
trappy has for
thermal_temperature. From a user point of view, it's unclear why trappy knows how to pivot it (or why does bart's
Analyzer.getStatement() know that
select should operate on the thermal zone id). Even worse, in the resulting object, the event is found in
run.thermal (instead of the expected
run.thermal_temperature). This is all very confusing for the new user.
- We should document which classes are known by trappy.
- We can keep
run.thermal(and basically every class derived from Base that has a
name), but we should alias it to the event name:
run.thermal_power_cpu_limit,... All documentation should be updated to use the event names to avoid confusion and the old names should only be kept for compatibility with old notebooks. Brownie points (i.e. you win a
❤) if we mark the old names as "deprecated".
- Extra brownie points (you win
💕 💕and a badge) if we make
Runinstances introspectable. That is, you can call a function to know which events are registered. Ideally the introspection tells the user which events have been parsed without the user having to look at the help of the function to understand the output. At the same time, the output should be programmatic, a program should be able to use the return value without too much hassle. Maybe something like (better proposals welcome):
In : import trappy In : run = trappy.Run(events=["thermal_temperature", "thermal_power_cpu_limit"]) In : run.get_events() Out: trace_event name num_events 0 thermal_temperature thermal 249 1 thermal_power_cpu_limit cpu_in_power 152 [2 rows x 3 columns]