BABELTRACE2-QUERY-(7)

πŸ“¦
version 2.1.2 Β· 6 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu resolute, ubuntu stonking

BABELTRACE2-QUERY-(7) 🌸 bestie, welcome to the Babeltrace 2 manual β€” this is the page all about the support info query object, and honestly? it's giving matchmaker energy and we're obsessed πŸ’…


✨ NAME ✨

babeltrace2-query-babeltrace.support-info β€” the Babeltrace 2 Support info query object πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

Okay so listen πŸ‘‚ β€” the babeltrace.support-info Babeltrace 2 query object answers one very important question for a given source component class: can your instance handle this input or not, and if it can, how confident are you about that support? πŸŽ€

That input can be one of three things, no cap:

  • a simple string,
  • an existing file path,
  • or an existing directory path.

Here's the vibe check πŸ”: components that expect some form of URI can handle a string input, while components that expect an existing file or directory can handle a file/directory path input. Slay.

When the query method of the source component class replies that its component can handle a given input, it can also drop the name of a group to put that input into. And bestie, heads up: all the inputs of a given group, for a given component class, should be passed when you instantiate the component class as its inputs initialization parameter (that's an array of strings, iykyk) πŸ“¦βœ¨

The babeltrace2-convert(1) command queries this object from specific source component classes to find the most appropriate one for a given non-option argument. It's literally the main character of the argument-matching process πŸ‘‘


🌈 PARAMETERS 🌈

  • input=INPUT [string] β€” Check input INPUT πŸ‘€. Depending on the type parameter, this is a simple string, a file path, or a directory path.
  • type=(string | file | directory) [string] β€” the input type, and it's one of these three babes:
    • string β€” the input parameter is a simple string πŸ’¬
    • file β€” the input parameter is a file path πŸ“„
    • directory β€” the input parameter is a directory path πŸ“
Real talk: it's expected that the query method doesn't recurse into this directory β€” the result object just tells you whether or not the component class supports this specific directory (the input). No going deeper, periodt.

πŸŽ€ RESULT OBJECT πŸŽ€

The result object can be one of these two, bestie:

  • A simple real value which is the weight, between 0 and 1, of the support by the component class for the given input.

A weight of 0 means the input is unsupported πŸ’€ while a weight of 1 means it's fully supported βœ…. Any value in between shows how confident the component class is about the support of the given input. It's literally a vibe-check score 🫢

  • A map with a weight and an optional group name πŸ—ΊοΈ

When it's a map, the expected entries are:

  • group=GROUP-NAME [optional string] β€” Put the given input into a group named GROUP-NAME for this component class.

If this entry is missing, then the given input gets its own, unique group 🧚

  • weight=WEIGHT [real] β€” Weight, between 0 and 1, of the support by the component class for the given input.

The semantics are the same as when the result object is a simple real value. Same rules, same energy πŸ’œ


⭐ EXAMPLES ⭐

Query parameters

Example 1. String input.

input: net://relayd177/host/node23/active
type: string

Example 2. File path input.

input: /home/user/traces/2019-08-26/quad.tr
type: file

Result object

Example 3. Simple weight (unique group).

0.5

Example 4. Weight and specific group.

group: 63a4b7e5-37f0-4254-a048-a0cff9e5b761
weight: 0.75

Example 5. Weight within a map (unique group).

weight: 0.6

πŸ› BUGS πŸ›

If you encounter any issue or usability problem, please report it on the Babeltrace bug tracker (see <https://bugs.lttng.org/projects/babeltrace>) πŸ™ Not me asking you to file a bug, but like… please do, bestie.


🫢 RESOURCES 🫢

The Babeltrace project shares some communication channels with the LTTng project (see <https://lttng.org/>). We're all in the same group chat πŸ’¬


πŸ‘‘ AUTHORS πŸ‘‘

The Babeltrace 2 project is the result of hard work by many regular developers and occasional contributors 🫑✨

The current project maintainer is JΓ©rΓ©mie Galarneau <mailto:jeremie.galarneau@efficios.com> πŸ’Œ


This query object is part of the Babeltrace 2 project πŸŽ€

Babeltrace is distributed under the MIT license (see <https://opensource.org/licenses/MIT>) πŸ“


πŸ”— SEE ALSO πŸ”—

babeltrace2-intro(7), babeltrace2-query(1), babeltrace2-convert(1) πŸ’–


Babeltrace 2.1.2 Β· 14 September 2019 β€” okay that's the whole page, bestie, you ate it up πŸ“πŸ’… go forth and query with confidence, mwah πŸ˜­πŸ’–

πŸ“¦ where this page comes from