Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
T
tracetools_analysis
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
micro-ROS
ros_tracing
tracetools_analysis
Commits
24ca3269
Commit
24ca3269
authored
Jun 27, 2019
by
Christophe Bedard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format
parent
fcecda6c
Pipeline
#68330328
passed with stage
in 1 minute and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
11 deletions
+27
-11
tracetools_analysis/tracetools_analysis/analysis/utils.py
tracetools_analysis/tracetools_analysis/analysis/utils.py
+27
-11
No files found.
tracetools_analysis/tracetools_analysis/analysis/utils.py
View file @
24ca3269
...
...
@@ -52,7 +52,9 @@ class DataModelUtil():
# Get their symbol
return
{
obj
:
callback_symbols
.
loc
[
obj
,
'symbol'
]
for
obj
in
callback_objects
}
def
get_callback_durations
(
self
,
callback_obj
:
int
)
->
DataFrame
:
def
get_callback_durations
(
self
,
callback_obj
:
int
)
->
DataFrame
:
"""
Get durations of callback instances for a given callback object.
...
...
@@ -64,7 +66,9 @@ class DataModelUtil():
:
]
def
get_callback_owner_info
(
self
,
callback_obj
:
int
)
->
Union
[
str
,
None
]:
def
get_callback_owner_info
(
self
,
callback_obj
:
int
)
->
Union
[
str
,
None
]:
"""
Get information about the owner of a callback.
...
...
@@ -104,7 +108,9 @@ class DataModelUtil():
info
=
f
'{type_name} -- {self.format_info_dict(info)}'
return
info
def
get_timer_handle_info
(
self
,
timer_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
def
get_timer_handle_info
(
self
,
timer_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
"""
Get information about the owner of a timer.
...
...
@@ -120,7 +126,9 @@ class DataModelUtil():
period_ms
=
period_ns
/
1000000.0
return
{
'tid'
:
tid
,
'period'
:
f
'{period_ms:.0f} ms'
}
def
get_publisher_handle_info
(
self
,
publisher_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
def
get_publisher_handle_info
(
self
,
publisher_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
"""
Get information about a publisher handle.
...
...
@@ -129,14 +137,16 @@ class DataModelUtil():
"""
if
publisher_handle
not
in
self
.
_data
.
publishers
.
index
:
return
None
node_handle
=
self
.
_data
.
publishers
.
loc
[
publisher_handle
,
'node_handle'
]
node_handle_info
=
self
.
get_node_handle_info
(
node_handle
)
topic_name
=
self
.
_data
.
publishers
.
loc
[
publisher_handle
,
'topic_name'
]
publisher_info
=
{
'topic'
:
topic_name
}
return
{
**
node_handle_info
,
**
publisher_info
}
def
get_subscription_handle_info
(
self
,
subscription_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
def
get_subscription_handle_info
(
self
,
subscription_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
"""
Get information about a subscription handle.
...
...
@@ -156,7 +166,9 @@ class DataModelUtil():
subscription_info
=
{
'topic'
:
topic_name
}
return
{
**
node_handle_info
,
**
subscription_info
}
def
get_service_handle_info
(
self
,
service_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
def
get_service_handle_info
(
self
,
service_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
"""
Get information about a service handle.
...
...
@@ -165,14 +177,16 @@ class DataModelUtil():
"""
if
service_handle
not
in
self
.
_data
.
services
:
return
None
node_handle
=
self
.
_data
.
services
.
loc
[
service_handle
,
'node_handle'
]
node_handle_info
=
self
.
get_node_handle_info
(
node_handle
)
service_name
=
self
.
_data
.
services
.
loc
[
service_handle
,
'service_name'
]
service_info
=
{
'service'
:
service_name
}
return
{
**
node_handle_info
,
**
service_info
}
def
get_client_handle_info
(
self
,
client_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
def
get_client_handle_info
(
self
,
client_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
"""
Get information about a client handle.
...
...
@@ -181,14 +195,16 @@ class DataModelUtil():
"""
if
client_handle
not
in
self
.
_data
.
clients
:
return
None
node_handle
=
self
.
_data
.
clients
.
loc
[
client_handle
,
'node_handle'
]
node_handle_info
=
self
.
get_node_handle_info
(
node_handle
)
service_name
=
self
.
_data
.
clients
.
loc
[
client_handle
,
'service_name'
]
service_info
=
{
'service'
:
service_name
}
return
{
**
node_handle_info
,
**
service_info
}
def
get_node_handle_info
(
self
,
node_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
def
get_node_handle_info
(
self
,
node_handle
:
int
)
->
Union
[
Mapping
[
str
,
Any
],
None
]:
"""
Get information about a node handle.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment