Skip to content

Commit

Permalink
add filter based on the time the measurement was started for all syst…
Browse files Browse the repository at this point in the history
…ems (#504)

Signed-off-by: ymski <[email protected]>
  • Loading branch information
ymski authored May 21, 2024
1 parent a7f0546 commit ba41ba9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/caret_analyze/infra/lttng/lttng.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,23 @@ def _parse_lttng_data(
tid_remapper = MultiHostIdRemapper(LttngEventFilter.VTID)
pid_remapper = MultiHostIdRemapper(LttngEventFilter.VPID)
event_remapper = IDRemapperCollection()
event_collections = []
begins = []
ends = []
for trace_dir in trace_dir_or_events:
event_collection = EventCollection(
trace_dir, force_conversion) # type: ignore
print('{} events found.'.format(len(event_collection)))

common = LttngEventFilter.Common()
begin, end = event_collection.time_range()
common.start_time, common.end_time = begin, end

event_collections.append(event_collection)
begins.append(begin)
ends.append(end)

for event_collection in event_collections:
common.start_time, common.end_time = max(begins), min(ends)

# Offset is obtained for conversion from
# the monotonic clock time to the system time.
Expand Down

0 comments on commit ba41ba9

Please sign in to comment.