ARM-software / lisa

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

Add TraceBase.with_time_offset() #2155

Closed douglas-raillard-arm closed 7 months ago

douglas-raillard-arm commented 9 months ago
# Create a view with arbitrary post processing on event dataframes returned by df_event()
def f(df):
   df = df.copy()
   df = do_something(df)
   return df
trace_view = trace.get_view(process_df=f)

# Create a view with shifted time 
trace_view = trace.with_time_offset(42)

# Create a view with shifted time and cropped to remove all negative timestamps
trace_view = trace.with_time_offset(42)[0:]

df = trace_view.df_event('sched_switch')
douglas-raillard-arm commented 7 months ago

Closing as the project has moved to https://gitlab.arm.com/tooling/lisa/