McapStatistics

āš ļø This type is unstable and may change significantly in a way that the data won't be backwards compatible. Recording-level statistics about an MCAP file, logged as a part of archetypes.RecordingInfo.

This archetype contains summary information about an entire MCAP recording, including counts of messages, schemas, channels, and other records, as well as timing information spanning the full recording duration. It is typically logged once per recording to provide an overview of the dataset's structure and content.

See also archetypes.McapChannel for individual channel definitions, archetypes.McapMessage for message content, archetypes.McapSchema for schema definitions, and the MCAP specification for complete format details.

Fields fields

Required required

Optional optional

Can be shown in can-be-shown-in

Example example

Simple MCAP statistics simple-mcap-statistics

"""Log simple MCAP recording statistics."""

import rerun as rr

rr.init("rerun_example_mcap_statistics", spawn=True)

rr.log(
    "mcap/statistics/recording_overview",
    rr.McapStatistics(
        message_count=12500,
        schema_count=3,
        channel_count=5,
        attachment_count=2,
        metadata_count=8,
        chunk_count=25,
        message_start_time=1743465600000000000,  # 2024-04-01 00:00:00 UTC in nanoseconds
        message_end_time=1743466200000000000,  # 2024-04-01 00:10:00 UTC in nanoseconds (10 minute recording)
    ),
)