Skip to content

Commit

Permalink
refactor: docstring
Browse files Browse the repository at this point in the history
Signed-off-by: h-suzuki <[email protected]>
  • Loading branch information
h-suzuki-isp committed Sep 6, 2024
1 parent e265ad4 commit ad59288
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/caret_analyze/infra/lttng/lttng.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ def compose_intra_proc_comm_records(
-------
RecordsInterface
Columns
- tid
- callback_object
- callback_start_timestamp
- publisher_handle
Expand All @@ -937,7 +937,6 @@ def compose_callback_records(
- callback_start_timestamp
- callback_end_timestamp
- is_intra_process
- callback_object
"""
Expand Down
17 changes: 12 additions & 5 deletions src/caret_analyze/infra/lttng/lttng_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,14 +870,14 @@ def timer_callbacks(self) -> TracePointData:
-------
pd.DataFrame
Column
- callback_id
- callback_object
- node_handle
- timer_handle
- callback_group_addr
- period_ns,
- symbol
- construction_order
- callback_id
"""
return self._timer_callbacks
Expand All @@ -895,16 +895,16 @@ def subscription_callbacks(self) -> TracePointData:
-------
pd.DataFrame
columns
- callback_id
- callback_object
- callback_object_intra
- node_handle
- subscription_handle
- callback_group_addr
- topic_name
- symbol
- construction_order
- callback_id
- depth
- construction_order
"""
return self._sub_callbacks
Expand All @@ -924,9 +924,9 @@ def service_callbacks(self) -> TracePointData:
Columns
- callback_id
- callback_object
- callback_group_addr
- node_handle
- service_handle
- callback_group_addr
- service_name
- symbol
- construction_order
Expand All @@ -947,6 +947,7 @@ def nodes(self) -> TracePointData:
-------
pd.DataFrame
Columns
- node_id
- node_handle
- node_name
Expand All @@ -962,6 +963,7 @@ def publishers(self) -> TracePointData:
-------
pd.DataFrame
Columns
- publisher_id
- publisher_handle
- node_handle
- topic_name
Expand All @@ -980,6 +982,7 @@ def subscriptions(self) -> TracePointData:
-------
pd.DataFrame
Columns
- subscription_id
- subscription_handle
- node_handle
- topic_name
Expand All @@ -998,6 +1001,7 @@ def services(self) -> TracePointData:
-------
pd.DataFrame
Columns
- service_id
- service_handle
- node_handle
- service_name
Expand All @@ -1015,6 +1019,7 @@ def timers(self) -> TracePointData:
-------
pd.DataFrame
Columns
- timer_id
- timer_handle
- node_handle
- period
Expand All @@ -1032,6 +1037,7 @@ def executor(self) -> TracePointData:
-------
pd.DataFrame
Columns
- executor_id
- executor_addr
- executor_type_name
Expand All @@ -1047,10 +1053,10 @@ def callback_groups(self) -> TracePointData:
-------
pd.DataFrame
Columns
- callback_group_id
- callback_group_addr
- executor_addr
- group_type_name
- callback_group_id
"""
return self._cbg
Expand All @@ -1065,6 +1071,7 @@ def tilde_publishers(self) -> TracePointData:
pd.DataFrame
Columns
- tilde_publisher
- tilde_subscription
- node_name
- topic_name
Expand Down
39 changes: 38 additions & 1 deletion src/caret_analyze/infra/lttng/records_provider_lttng.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def communication_records(
comm_val : CommunicationStructValue
communication value.
Returns
Returns (inter procces communication)

Check warning on line 85 in src/caret_analyze/infra/lttng/records_provider_lttng.py

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (procces)
-------
RecordsInterface
Columns
Expand All @@ -92,6 +92,15 @@ def communication_records(
- [topic_name]/dds_publish_timestamp (Optional)
- [topic_name]/source_timestamp (only inter process)
- [callback_name]/callback_start_timestamp
-------
Returns (intra procces communication)

Check warning on line 97 in src/caret_analyze/infra/lttng/records_provider_lttng.py

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (procces)
-------
RecordsInterface
Columns
- [topic_name]/rclcpp_publish_timestamp
- [callback_name]/callback_start_timestamp
"""
assert comm_val.subscribe_callback_name is not None
Expand Down Expand Up @@ -1570,6 +1579,12 @@ def sub_records(
]
)
columns:
- callback_start_timestamp
- callback_object
- is_intra_process
- source_timestamp
"""
grouped_records = self._grouped_sub_records
if len(grouped_records) == 0:
Expand Down Expand Up @@ -1613,6 +1628,15 @@ def inter_comm_records(
Returns
-------
RecordsInterface
columns:
- callback_object
- callback_start_timestamp
- publisher_handle
- rclcpp_publish_timestamp
- rcl_publish_timestamp (Optional)
- dds_write_timestamp (Optional)
- message_timestamp
- source_timestamp
"""
pub_records = self.publish_records(publisher_handles)
Expand Down Expand Up @@ -1678,6 +1702,13 @@ def intra_comm_records(
x.get('publisher_handle') in publisher_handles
)
columns:
- callback_object
- callback_start_timestamp
- publisher_handle
- rclcpp_publish_timestamp
- message_timestamp
"""
grouped_records = self._grouped_intra_comm_records
Expand Down Expand Up @@ -1856,6 +1887,12 @@ def callback_records(
lambda x: x.['callback_object] in [inter_callback_object, intra_callback_object]
)
columns:
- callback_start_timestamp
- callback_end_timestamp
- is_intra_process
- callback_object
"""
records = self._grouped_callback_records
callback_records = RecordsFactory.create_instance(
Expand Down
2 changes: 1 addition & 1 deletion src/caret_analyze/infra/lttng/records_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ def path_beginning_records(self) -> RecordsInterface:
- callback_start_timestamp
- rclcpp_publish_timestamp
- callback_object
- publisher_object
- publisher_handle
"""
records_inter: RecordsInterface
Expand Down

0 comments on commit ad59288

Please sign in to comment.