Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn if traces have been dropped #25

Merged
merged 1 commit into from
Mar 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ros2profile/ros2profile/data/convert/ctf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
import lzma
import pickle

Expand Down Expand Up @@ -115,6 +116,8 @@ def load_ctf(directory: str, ignore_names: List[str] = LTTNG_IGNORE_NAMES) -> Ct
events = defaultdict(list)

for msg in msg_it:
if type(msg) is bt2._DiscardedEventsMessageConst:
logging.warning("Trace lost packets! Data association may fail! Measurements may be missing!")
if type(msg) is not bt2._EventMessageConst or msg.event.name in ignore_names:
continue
pod = event_to_dict(msg)
Expand Down