Beispiel #1
0
    def timestamp_end(self):
        """
        End timestamp of this trace collection (nanoseconds since
        Epoch).
        """

        pos_ptr = nbt._bt_iter_pos()
        pos_ptr.type = nbt.SEEK_LAST

        return self._timestamp_at_pos(pos_ptr)
Beispiel #2
0
    def events(self):
        """
        Generates the ordered :class:`Event` objects of all the opened
        traces contained in this trace collection.

        Due to limitations of the native Babeltrace API, only one event
        may be "alive" at a given time, i.e. a user **should never**
        store a copy of the events returned by this function for
        ulterior use. Users shall make sure to copy the information
        they need *from* an event before accessing the next one.
        """

        begin_pos_ptr = nbt._bt_iter_pos()
        end_pos_ptr = nbt._bt_iter_pos()
        begin_pos_ptr.type = nbt.SEEK_BEGIN
        end_pos_ptr.type = nbt.SEEK_LAST

        for event in self._events(begin_pos_ptr, end_pos_ptr):
            yield event
Beispiel #3
0
    def timestamp_begin(self):
        """
        Begin timestamp of this trace collection (nanoseconds since
        Epoch).
        """

        pos_ptr = nbt._bt_iter_pos()
        pos_ptr.type = nbt.SEEK_BEGIN

        return self._timestamp_at_pos(pos_ptr)
Beispiel #4
0
    def timestamp_end(self):
        """
        End timestamp of this trace collection (nanoseconds since
        Epoch).
        """

        pos_ptr = nbt._bt_iter_pos()
        pos_ptr.type = nbt.SEEK_LAST

        return self._timestamp_at_pos(pos_ptr)
Beispiel #5
0
    def timestamp_begin(self):
        """
        Begin timestamp of this trace collection (nanoseconds since
        Epoch).
        """

        pos_ptr = nbt._bt_iter_pos()
        pos_ptr.type = nbt.SEEK_BEGIN

        return self._timestamp_at_pos(pos_ptr)
Beispiel #6
0
    def events(self):
        """
        Generates the ordered :class:`Event` objects of all the opened
        traces contained in this trace collection.

        Due to limitations of the native Babeltrace API, only one event
        may be "alive" at a given time, i.e. a user **should never**
        store a copy of the events returned by this function for
        ulterior use. Users shall make sure to copy the information
        they need *from* an event before accessing the next one.
        """

        begin_pos_ptr = nbt._bt_iter_pos()
        end_pos_ptr = nbt._bt_iter_pos()
        begin_pos_ptr.type = nbt.SEEK_BEGIN
        end_pos_ptr.type = nbt.SEEK_LAST

        for event in self._events(begin_pos_ptr, end_pos_ptr):
            yield event
Beispiel #7
0
    def events_timestamps(self, timestamp_begin, timestamp_end):
        """
        Generates the ordered :class:`Event` objects of all the opened
        traces contained in this trace collection from *timestamp_begin*
        to *timestamp_end*.

        *timestamp_begin* and *timestamp_end* are given in nanoseconds
        since Epoch.

        See :attr:`events` for notes and limitations.
        """

        begin_pos_ptr = nbt._bt_iter_pos()
        end_pos_ptr = nbt._bt_iter_pos()
        begin_pos_ptr.type = end_pos_ptr.type = nbt.SEEK_TIME
        begin_pos_ptr.u.seek_time = timestamp_begin
        end_pos_ptr.u.seek_time = timestamp_end

        for event in self._events(begin_pos_ptr, end_pos_ptr):
            yield event
Beispiel #8
0
    def events_timestamps(self, timestamp_begin, timestamp_end):
        """
        Generates the ordered :class:`Event` objects of all the opened
        traces contained in this trace collection from *timestamp_begin*
        to *timestamp_end*.

        *timestamp_begin* and *timestamp_end* are given in nanoseconds
        since Epoch.

        See :attr:`events` for notes and limitations.
        """

        begin_pos_ptr = nbt._bt_iter_pos()
        end_pos_ptr = nbt._bt_iter_pos()
        begin_pos_ptr.type = end_pos_ptr.type = nbt.SEEK_TIME
        begin_pos_ptr.u.seek_time = timestamp_begin
        end_pos_ptr.u.seek_time = timestamp_end

        for event in self._events(begin_pos_ptr, end_pos_ptr):
            yield event