Skip to content

Commit

Permalink
doc: Add zero:// manpage
Browse files Browse the repository at this point in the history
  • Loading branch information
shramov committed Dec 17, 2023
1 parent 5b36361 commit f3aef38
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/channel/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ mansources = [
'common.rst',
'tcp.rst',
'udp.rst',
'zero.rst',
]

foreach f : mansources
Expand Down
52 changes: 52 additions & 0 deletions src/channel/zero.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
tll-channel-zero
================

:Manual Section: 7
:Manual Group: TLL
:Subtitle: Zeroed message generator channel

Synopsis
--------

``zero://;size=<size>;msgid=<integer>``

Description
-----------

Channel implements generator that is always ready to provide message, like ``/dev/zero`` special
device. On each ``tll_channel_process`` message callback is invoked. Signalling file descriptor (if
not disabled with ``fd=no``) is always ready.

This channel is mostly useful in benchmarks or transport load tests. Each time same message is
passed to callback so runtime overhead is minimal - process call takes only several nanoseconds
(depening on machine) so reading from this channel can give hundreds of millions of messages per
second.

Init parameters
~~~~~~~~~~~~~~~

``size=<size>`` (default ``1kb``) - size of generated message.

``msgid=<int>`` (default ``0``) - id of generated message.

``fill=<int8>`` (default ``0``) - fill character used to memset message body.

``pending=<bool>`` (default ``true``) - disable pending dynamic flag. Useful to test performance of
processing loop in different scenarios.

Examples
--------

Generate stream of messages with id 10 of size 256:

::

zero://;size=256b;msgid=10

See also
--------

``tll-channel-common(7)``

..
vim: sts=4 sw=4 et tw=100

0 comments on commit f3aef38

Please sign in to comment.