Skip to content
This repository has been archived by the owner on Nov 26, 2021. It is now read-only.

Clarify which events are predefined #93

Open
JaviMerino opened this issue Dec 4, 2015 · 0 comments
Open

Clarify which events are predefined #93

JaviMerino opened this issue Dec 4, 2015 · 0 comments
Milestone

Comments

@JaviMerino
Copy link
Contributor

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_temperature, 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 Run instances 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 [1]: import trappy

In [2]: run = trappy.Run(events=["thermal_temperature", "thermal_power_cpu_limit"])

In [3]: run.get_events()
Out[3]: 
               trace_event          name  num_events
0      thermal_temperature       thermal         249
1  thermal_power_cpu_limit  cpu_in_power         152

[2 rows x 3 columns]
@JaviMerino JaviMerino changed the title make it clear which events are predefined Clarify which events are predefined Dec 4, 2015
@JaviMerino JaviMerino added this to the LPC 2016 milestone Jul 12, 2016
valschneider pushed a commit to valschneider/trappy that referenced this issue Sep 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant