ctf: remove `intersection-range-ns` from `babeltrace.trace-info` query
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 28 Aug 2019 20:31:12 +0000 (16:31 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:23 +0000 (11:58 -0400)
commit2532cf78d0cd0fec227267685be6cc5383ac7303
tree396e711978a9bec44f8ad944ca3a517a199c80bf
parent0c695fa2a58b0b59e9cb493cb95891e20da58206
ctf: remove `intersection-range-ns` from `babeltrace.trace-info` query

The `intersection-range-ns` field of the `src.ctf.fs` component class
response to the `babeltrace.trace-info` query is not essential, since it
can easily be computed from the stream ranges also in the response.
Remove it, and adjust users to compute the intersection themselves.

One user is the CLI and the other is the TraceCollectionMessageIterator
class in the Python bindings.

There is a small implementation detail change in
TraceCollectionMessageIterator.  Previously, we would do one
`babeltrace.trace-info` query per port.  With this patch, we pre-compute
the intersection range for each source component port and store it in a
port name to intersection mapping.  When we create the trimmers, we just look
up that value.

It results in less queries and avoids computing the intersections many
times.  It is also in line with how the CLI does.

Change-Id: Ic5ebded4d810ef992594941dde3316613909c98c
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1994
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/bindings/python/bt2/bt2/trace_collection_message_iterator.py
src/cli/babeltrace2.c
src/plugins/ctf/fs-src/query.c
tests/plugins/src.ctf.fs/query/test_query_trace_info.py
This page took 0.024637 seconds and 4 git commands to generate.