In the Babeltrace 2 manual pages, a component is represented with
a box. The box has the component class type, plugin name, and
component class name at the top. Just below, between square
brackets, is its component name within the trace processing
graph. Each port is represented with an @
symbol on the border(s)
of the component box with its name inside the box. Output ports
are on the box's right border while input ports are on the box's
left border.
For example, here's a source component box:
+------------+
| src.ctf.fs |
| [my-src] |
| |
| stream0 @
| stream1 @
| stream2 @
+------------+
This one is an instance of the source.ctf.fs
component class
named my-src
. It has three output ports named stream0
, stream1
,
and stream2
.
A trace processing graph is represented with multiple component
boxes connected together. The connections are arrows from output
ports to input ports.
For example, here's a simple conversion graph:
+------------+ +-----------------+ +------------------+
| src.ctf.fs | | flt.utils.muxer | | sink.text.pretty |
| [ctf] | | [muxer] | | [text] |
| | | | | |
| stream0 @--->@ in0 out @--->@ in |
| stream1 @--->@ in1 | +------------------+
| stream2 @--->@ in2 |
+------------+ @ in3 |
+-----------------+
Note that input port in3
of component muxer
is not connected in
this example.
Sometimes, we symbolically represent other resources which are
consumed from or produced by components. In this case, arrows are
used, but they do not go to or from port symbols (@
), except for
messages. For example, in the graph above, the ctf
source
component consumes a CTF trace and the text
sink component prints
plain text to the terminal, so here's a more complete diagram:
CTF trace
|
| +------------+ +-----------------+ +------------------+
| | src.ctf.fs | | flt.utils.muxer | | sink.text.pretty |
'-->| [ctf] | | [muxer] | | [text] |
| | | | | |
| stream0 @--->@ in0 out @--->@ in |
| stream1 @--->@ in1 | +-----+------------+
| stream2 @--->@ in2 | |
+------------+ @ in3 | '--> Terminal
+-----------------+
Here's another example of a more complex graph which splits a
specific stream using some criteria:
+------------+ +-----------------+ +------------------+
| src.ctf.fs | | flt.utils.muxer | | sink.text.pretty |
| [ctf-in] | | [muxer] | | [text] |
| | | | | |
| stream0 @--->@ in0 out @--->@ in |
| stream1 @--->@ in1 | +------------------+
| stream2 @-. @ in2 |
+------------+ | +-----------------+ +-------------+
| | sink.ctf.fs |
| | [ctf-out0] |
| +-------------------+ | |
| | flt.some.splitter | .->@ in |
| | [splitter] | | +-------------+
| | | |
'->@ in A @-' +-------------+
| B @-. | sink.ctf.fs |
+-------------------+ | | [ctf-out1] |
| | |
'->@ in |
+-------------+