Commit ce69dba8 authored by Christophe Bedard's avatar Christophe Bedard

Merge branch 'bokeh' into 'analysis'

Use bokeh instead of matplotlib

See merge request boschresearch/ros-wg/tracing/tracetools_analysis!4
parents ca810a01 fa95f0c8
Pipeline #68764023 passed with stage
in 1 minute and 42 seconds
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,6 +14,7 @@
"""Module for data model utility class."""
from datetime import datetime as dt
from typing import Any
from typing import Mapping
from typing import Union
......@@ -59,12 +60,20 @@ class DataModelUtil():
Get durations of callback instances for a given callback object.
:param callback_obj: the callback object value
:return: a dataframe containing the durations of all callback instances for that object
:return: a dataframe containing the start timestamp (datetime)
and duration (ms) of all callback instances for that object
"""
return self._data.callback_instances.loc[
data = self._data.callback_instances.loc[
self._data.callback_instances.loc[:, 'callback_object'] == callback_obj,
:
['timestamp', 'duration']
]
# Transform both columns to ms
data[['timestamp', 'duration']] = data[
['timestamp', 'duration']
].apply(lambda d: d / 1000000.0)
# Transform start timestamp column to datetime objects
data['timestamp'] = data['timestamp'].apply(lambda t: dt.fromtimestamp(t / 1000.0))
return data
def get_callback_owner_info(
self, callback_obj: int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment