BABELTRACE2-SINK.(7)

๐Ÿ“ฆ
version 2.1.2 ยท 6 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu resolute, ubuntu stonking

okay bestie, welcome to babeltrace2-sink.(7) โ€” the Babeltrace 2 manual page for the message-counting-est sink component there ever was. Come learn about the little component that just... counts things. Iconic behaviour, honestly. ๐Ÿงฎโœจ


๐ŸŒธ NAME ๐ŸŒธ

babeltrace2-sink.utils.counter โ€” Babeltrace 2: Message counter sink component class


๐Ÿ’… DESCRIPTION ๐Ÿ’…

So here's the vibe: a Babeltrace 2 sink.utils.counter component just prints to the standard output how many messages it consumes, with a separate count for each type. That's it. That's the whole job. And it eats at that job. ๐Ÿ‘‘

                +--------------------+
                | sink.utils.counter |
                |                    +--> Statistics to the
    Messages -->@ in                 |    standard output
                +--------------------+

If you're like "bestie what is even a Babeltrace 2 core concept", go read babeltrace2-intro(7) โ€” it explains the whole project and its core concepts. Required reading, no skips. ๐Ÿ“š

The output of the component looks like this:

            3842964 Event messages
                  4 Stream beginning messages
                  1 Stream end messages
                 18 Packet beginning messages
                 14 Packet end messages
                189 Discarded event messages
                  0 Discarded packet messages
                  3 Message iterator inactivity messages
            3843000 messages (TOTAL)

By default, a sink.utils.counter component prints a fresh block of statistics every 1000 consumed messages โ€” like, whatever their types, every thousand, boom, new block. You can override that default period with the step parameter. โฑ๏ธ

The component always prints a block of statistics when there's no more messages to consume from its upstream message iterator, and the last block was different. Like a little goodbye note. ๐Ÿฅน

By default, a sink.utils.counter component prints the count of messages for each type, even if this count is 0. Because zero is a number too, and it deserves representation. If you'd rather hide the zero counts, the hide-zero parameter is right there for you. ๐Ÿ™ˆ


โœจ INITIALIZATION PARAMETERS โœจ

  • hide-zero=VAL [optional boolean] โ€” if VAL is true, then don't print the statistics lines where the count is zero. Simple as that. Default: false.
  • step=STEP [optional unsigned integer] โ€” print a new block of statistics every STEP consumed messages instead of 1000. If STEP is 0, then the component only prints statistics when there's no more messages to consume. (so like, one dramatic final reveal ๐ŸŽญ)

๐ŸŽ€ PORTS ๐ŸŽ€

    +--------------------+
    | sink.utils.counter |
    |                    |
    @ in                 |
    +--------------------+

๐Ÿฆ‹ Input

  • in โ€” single input port. One port. One job. Main character energy.

๐Ÿ˜ญ BUGS ๐Ÿ˜ญ

If you encounter any issue or usability problem, please report it on the Babeltrace bug tracker (see <https://bugs.lttng.org/projects/babeltrace> ). Bestie, don't suffer in silence โ€” file the bug. ๐Ÿซถ


๐ŸŒˆ RESOURCES ๐ŸŒˆ

The Babeltrace project shares some communication channels with the LTTng project (see <https://lttng.org/> ).


๐Ÿ’œ AUTHORS ๐Ÿ’œ

The Babeltrace 2 project is the result of hard work by many regular developers and occasional contributors. Shoutout to every single one of them, fr fr. ๐Ÿซก

The current project maintainer is Jรฉrรฉmie Galarneau <mailto:jeremie.galarneau@efficios.com>.


This component class is part of the Babeltrace 2 project.

Babeltrace is distributed under the MIT license (see <https://opensource.org/licenses/MIT> ). ๐Ÿ“œ


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

babeltrace2-intro(7), babeltrace2-plugin-utils(7)


and that's the whole page bestie, you ate it up ๐Ÿ’…โœจ this was babeltrace2-sink.(7) from Babeltrace 2.1.2, dated 1 September 2023 โ€” go forth and count some messages, you gorgeous little message iterator you ๐ŸŽ€๐Ÿฆ‹๐Ÿ’–

๐Ÿ“ฆ where this page comes from