BABELTRACE2-SINK.(7)
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] โ ifVALis 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 everySTEPconsumed messages instead of1000. IfSTEPis0, 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/> ).
- Babeltrace website (see <https://babeltrace.org/> )
- Mailing list (see <https://lists.lttng.org> ) for support and development:
lttng-dev@lists.lttng.org - IRC channel (see <irc://irc.oftc.net/lttng> ):
#lttngonirc.oftc.net - Bug tracker (see <https://bugs.lttng.org/projects/babeltrace> )
- Git repository (see <https://git.efficios.com/?p=babeltrace.git> )
- GitHub project (see <https://github.com/efficios/babeltrace> )
- Continuous integration (see <https://ci.lttng.org/view/Babeltrace/> )
- Code review (see <https://review.lttng.org/q/project:babeltrace> )
๐ 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>.
๐ COPYRIGHT ๐
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
- fedora 43: babeltrace2 2.1.2-3.fc43 ยท MIT AND GPL-2.0-only
- fedora 44: babeltrace2 2.1.2-5.fc44 ยท MIT AND GPL-2.0-only
- nixos 26.05: babeltrace2 2.1.2
- nixpkgs unstable: babeltrace2 2.1.2
- ubuntu resolute: babeltrace2 2.1.2-1build2 ยท MIT
- ubuntu stonking: babeltrace2 2.1.2-1build2 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms