Add append_timestamp option for trace action

This commit is contained in:
Christophe Bedard 2019-08-04 13:04:44 +02:00
parent 2a7f857cc4
commit 5b2280d543
3 changed files with 17 additions and 1 deletions

View file

@ -38,6 +38,7 @@ class Trace(Action):
self,
*,
session_name: str,
append_timestamp: bool = False,
base_path: str = path.DEFAULT_BASE_PATH,
events_ust: List[str] = names.DEFAULT_EVENTS_ROS,
events_kernel: List[str] = names.DEFAULT_EVENTS_KERNEL,
@ -47,11 +48,13 @@ class Trace(Action):
Constructor.
:param session_name: the name of the tracing session
:param append_timestamp: whether to append timestamp to the session name
:param base_path: the path to the base directory in which to create the tracing session directory
:param events_ust: the list of ROS UST events to enable
:param events_kernel: the list of kernel events to enable
"""
super().__init__(**kwargs)
session_name = path.append_timestamp(session_name) if append_timestamp else session_name
self.__session_name = session_name
self.__base_path = base_path
self.__events_ust = events_ust