sink.text.details: print user attributes
This patch makes a `sink.text.details` component print user attributes.
The component only prints user attributes when the map value is not
empty.
The output looks like this:
Event class (ID 0):
User attributes:
domain: Python
ip: Length 4:
[0]: 192
[1]: 168
[2]: 0
[3]: 100
weight: 17.231600
with-net: Yes
...
The new write_value() function textually and recursively serializes a
value object. When writing a map value object, the keys are sorted
first.
The change brought by this patch is not invasive in that all the current
test expectation files do not need any change because the sources never
set any user attribute. The goal of this patch is not to add any textual
noise.
When an enumeration, a structure, or a variant field class has user
attributes, the component prints the mappings, members, and options
indented within a dedicated section, for example:
Payload field class: Structure (3 members):
User attributes:
a: 23
b: 'log'
Members:
hello: String
bbb: Boolean
opt: Option:
Content: Unsigned integer (64-bit, Base 10)
The same strategy applies to structure field class members and variant
field class options:
Payload field class: Structure (3 members):
hello:
Field class: String
User attributes:
factor: 17.150000
bbb: Boolean
opt: Option:
Content: Unsigned integer (64-bit, Base 10)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Icf3060dbf23bab607ebb7af6e839aa5b28bd2658
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1926
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
This page took 0.027495 seconds and 4 git commands to generate.