src.ctf.fs: trace-info: omit stream `range-ns` field when no TS
Don't print -1 timestamps when packet contexts don't have
`timestamp_begin` and `timestamp_end` fields. Simply omit this part of
the query reply.
Remove FIXME comment as the only user of the index now handles absent
timestamps.
Tests
=====
Adapt `test_ctf_plugin` stream sorting function to fall back on using
the `paths` field if `range-ns` field is absent and rename it to
abstract implementation details.
Add test case to test that `range-ns` fields are absent on traces
without `timestamp_begin` and `timestamp_end` fields in their packet
context.
Example
=======
Here is an example of the output of the `trace-info` query on a trace
without packet contexts before this commit:
-
streams:
-
range-ns:
begin: -1
end: -1
paths:
- /home/frdeso/projets/babeltrace/tests/ctf-traces/succeed/no-packet-context/stream
class-id: 0
port-name: /home/frdeso/projets/babeltrace/tests/ctf-traces/succeed/no-packet-context | 0 | /home/frdeso/projets/babeltrace/tests/ctf-traces/succeed/no-packet-context/stream
range-ns:
begin: -1
end: 0
name: no-packet-context
path: /home/frdeso/projets/babeltrace/tests/ctf-traces/succeed/no-packet-context
Here is an example of the output of the `trace-info` query on a trace
without packet contexts after this commit:
-
streams:
-
class-id: 0
port-name: /home/frdeso/projets/babeltrace/tests/ctf-traces/succeed/no-packet-context | 0 | /home/frdeso/projets/babeltrace/tests/ctf-traces/succeed/no-packet-context/stream
paths:
- /home/frdeso/projets/babeltrace/tests/ctf-traces/succeed/no-packet-context/stream
name: no-packet-context
path: /home/frdeso/projets/babeltrace/tests/ctf-traces/succeed/no-packet-context
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I419f57960a52d8ed2823fdb06982e5c20710b6da
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1387
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
This page took 0.024954 seconds and 4 git commands to generate.