diff --git a/debian/libtll-bin.install b/debian/libtll-bin.install index 42c34ce5..b3221b67 100644 --- a/debian/libtll-bin.install +++ b/debian/libtll-bin.install @@ -3,3 +3,4 @@ /usr/lib/*/libtll-logic*.so /usr/share/tll/scheme/tll/logic /usr/share/man/*/tll-bench-channel.* +/usr/share/man/*/tll-logic-* diff --git a/src/logic/meson.build b/src/logic/meson.build index 6a3823e3..3f357c00 100644 --- a/src/logic/meson.build +++ b/src/logic/meson.build @@ -24,3 +24,17 @@ shared_library('tll-logic-control' , dependencies : [fmt, tll, rapidjson] , install: true ) + +mansources = [ + 'quantile.rst', + ] + +foreach f : mansources + custom_target('logic-man-@0@'.format(f) + , input: f + , output : 'tll-logic-@BASENAME@.7' + , command : [rst2man, '@INPUT@', '@OUTPUT@'] + , install_dir: get_option('mandir') / 'man7' + , install: true + ) +endforeach diff --git a/src/logic/quantile.rst b/src/logic/quantile.rst new file mode 100644 index 00000000..481b62a8 --- /dev/null +++ b/src/logic/quantile.rst @@ -0,0 +1,66 @@ +tll-logic-quantile +================== + +:Manual Section: 7 +:Manual Group: TLL +:Subtitle: Quantile calculation logic + +Synopsis +-------- + +:: + + tll.proto: quantile + skip: + quantiles: + tll.channel.timer: + tll.channel.input: + + +Description +----------- + +Logic implements calculation of quantiles for the stream of input data with result dumped to logs on +each event from timer channel. Two types of quantiles are gathered - "global", covering all data +seen since logic open and "local", for data from last timer event. Input stream can contain +different types of values distinguished by short string tag. When a tag is seen first time new +quantile group is started and included in next dump. + +Calculations are performed in constant memory and time using logarithmic aggregation with precision +of ``0.001 * value`` and are not exact. In practice this type of error is tolerable. + +Channels +~~~~~~~~ + +``input`` - stream of input data + +``timer`` - timer events + +Init parameters +~~~~~~~~~~~~~~~ + +``quantiles=`` (default ``95``) - list of quantiles (in percents), list of integer +values in range (0, 100] separated by comma, for example ``95,90,50``. + +``skip=`` (default ``0``) - amount of timer ticks to skip before recording global quantile +values. Useful to ignore inital stabilization time of measured system. + +Input scheme +------------ + +.. code-block:: yaml + + - name: Data + id: 10 + fields: + - {name: name, type: byte8, options.type: string} + - {name: value, type: uint64} + +See also +-------- + +``tll-logic-common(7)`` + +.. + vim: sts=4 sw=4 et tw=100 +