ARM-software / lisa

Linux Integrated System Analysis
Apache License 2.0
200 stars 119 forks source link

lisa.trace: Allow Trace(normalize_time=<float>, ...) #2154

Closed douglas-raillard-arm closed 9 months ago

douglas-raillard-arm commented 9 months ago

FEATURE

Allow normalizing time with an arbitrary offset. Use of True/False still have the same meaning as before.

douglas-raillard-arm commented 9 months ago

As discussed offline with @msrasmussen , instead of modifying the base Trace class, we should make TraceView more powerful and pass a post-processing function that allows modifying the dataframe returned by df_event() in arbitrary ways. Then we can build up on that with a Trace.with_time_offset() method simply creating a TraceView with a function applying an offset on the index.

douglas-raillard-arm commented 9 months ago

Closing in favor of https://github.com/ARM-software/lisa/pull/2155