Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
do not render hz if no messages (#1006)
### Public-Facing Changes For `mcap info`, removes channel hz display if there are no or one messages in a channel. This avoids displaying an ugly `NaN` or `Inf`. Before: ``` j@192-168-1-108 python % mcap info ~/this.mcap library: python mcap 1.1.1 profile: messages: 1 duration: 0s start: 2023-11-02T05:34:10.165983+11:00 (1698863650.165983000) end: 2023-11-02T05:34:10.165983+11:00 (1698863650.165983000) compression: zstd: [1/1 chunks] [234.00 B/153.00 B (34.62%)] channels: (1) sample_topic 0 msgs (NaN Hz) : sample [jsonschema] (2) sample_topic 1 msgs (+Inf Hz) : sample [jsonschema] attachments: 0 metadata: 0 ``` After: ``` j@192-168-1-108 mcap % ./bin/mcap info ~/this.mcap library: python mcap 1.1.1 profile: messages: 1 duration: 0s start: 2023-11-02T05:34:10.165983+11:00 (1698863650.165983000) end: 2023-11-02T05:34:10.165983+11:00 (1698863650.165983000) compression: zstd: [1/1 chunks] [234.00 B/153.00 B (34.62%)] channels: (1) sample_topic 0 msgs : sample [jsonschema] (2) sample_topic 1 msgs : sample [jsonschema] attachments: 0 metadata: 0 ```
- Loading branch information