Пример #1
0
def main():
    params = args.parse_args()

    session_name = params.session_name
    base_path = params.path
    ros_events = params.events_ust
    kernel_events = params.events_kernel

    ust_enabled = len(ros_events) > 0
    kernel_enabled = len(kernel_events) > 0
    if ust_enabled:
        print(f'UST tracing enabled ({len(ros_events)} events)')
        if params.list:
            print_events_list(ros_events)
    else:
        print('UST tracing disabled')
    if kernel_enabled:
        print(f'kernel tracing enabled ({len(kernel_events)} events)')
        if params.list:
            print_events_list(kernel_events)
    else:
        print('kernel tracing disabled')

    full_session_path = path.get_full_session_path(session_name, base_path)
    print(f'writing tracing session to: {full_session_path}')
    input('press enter to start...')
    lttng.lttng_init(session_name,
                     base_path=base_path,
                     ros_events=ros_events,
                     kernel_events=kernel_events)
    input('press enter to stop...')

    print('stopping & destroying tracing session')
    lttng.lttng_fini(session_name)
Пример #2
0
def fini(session_name: str, ) -> None:
    """
    Stop and finalize tracing.

    :param session_name: the name of the session
    """
    input('press enter to stop...')
    print('stopping & destroying tracing session')
    lttng.lttng_fini(session_name)
Пример #3
0
def fini(args):
    """
    Stop and finalize tracing.

    :param args: the parsed arguments object containing the right fields
    """
    session_name = args.session_name
    input('press enter to stop...')
    print('stopping & destroying tracing session')
    lttng.lttng_fini(session_name)
Пример #4
0
 def _fini() -> None:
     print('stopping & destroying tracing session')
     lttng.lttng_fini(session_name)
Пример #5
0
 def _destroy(self, event: Event, context: LaunchContext) -> None:
     self.__logger.debug(
         f'Finalizing tracing session: {self.__session_name}')
     lttng.lttng_fini(self.__session_name)
Пример #6
0
 def _destroy(self, event: Event, context: LaunchContext) -> None:
     lttng.lttng_fini(self.__session_name)