Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Koudai Yamasaki <[email protected]>
  • Loading branch information
ymski committed Jan 16, 2025
1 parent 104c56a commit 573bb02
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/caret_analyze/infra/lttng/records_provider_lttng.py
Original file line number Diff line number Diff line change
Expand Up @@ -1379,11 +1379,15 @@ def fill_source_timestamp_with_latest_timestamp(records):
f'{self._node_path.publish_topic_name}/rclcpp_publish_timestamp',
]
left_key = sub_records.columns[0]
for column in sub_records.columns:
if column.endswith(COLUMN_NAME.RMW_TAKE_TIMESTAMP):
columns.remove(column)
left_key = column
break

# Set left_key to rmw_take timestamp
# if sub_records are obtained by RecordsProviderLttng.subscription_take_records()
if is_take_node:
for column in sub_records.columns:
if column.endswith(COLUMN_NAME.RMW_TAKE_TIMESTAMP):
columns.remove(column)
left_key = column
break

pub_sub_records = merge_sequential(
left_records=sub_records,
Expand Down

0 comments on commit 573bb02

Please sign in to comment.