From 602d20a206a92e112d10baf84cb5163241a390f7 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Mon, 16 Sep 2019 01:18:24 -0400 Subject: [PATCH] Update project plugins's properties This patch updates various properties of the project's plugins. Those properties are publicly visible through the API or with the CLI's `help` command. The updated properties are: Descriptions: Updated to add details or normalize them. Authors: All changed to `EfficiOS `. Keeping a specific up-to-date list of authors will be challenging in the future, especially with many contributors. Help texts: Added to refer to specific manual pages. Maybe we can find a way to set a manual page's plain text as a component class's help text in the future, but in the meantime at least the user knows where to look for help. Signed-off-by: Philippe Proulx Change-Id: I44d13a89039e433c06e1c527eb2be577fd471454 Reviewed-on: https://review.lttng.org/c/babeltrace/+/2047 CI-Build: Simon Marchi Tested-by: jenkins Reviewed-by: Simon Marchi --- src/plugins/ctf/plugin.c | 13 ++++++++++--- src/plugins/lttng-utils/plugin.c | 6 ++++-- src/plugins/text/plugin.c | 12 +++++++++--- src/plugins/utils/plugin.c | 16 ++++++++++++---- tests/bindings/python/bt2/test_plugin.py | 6 +++--- 5 files changed, 38 insertions(+), 15 deletions(-) diff --git a/src/plugins/ctf/plugin.c b/src/plugins/ctf/plugin.c index 95974030..27f4e373 100644 --- a/src/plugins/ctf/plugin.c +++ b/src/plugins/ctf/plugin.c @@ -38,14 +38,16 @@ BT_PLUGIN_MODULE(); /* Initialize plug-in description. */ BT_PLUGIN(ctf); -BT_PLUGIN_DESCRIPTION("CTF source and sink support"); -BT_PLUGIN_AUTHOR("Julien Desfossez, Mathieu Desnoyers, Jérémie Galarneau, Philippe Proulx"); +BT_PLUGIN_DESCRIPTION("CTF input and output"); +BT_PLUGIN_AUTHOR("EfficiOS "); BT_PLUGIN_LICENSE("MIT"); /* ctf.fs source */ BT_PLUGIN_SOURCE_COMPONENT_CLASS(fs, ctf_fs_iterator_next); BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(fs, "Read CTF traces from the file system."); +BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(fs, + "See the babeltrace2-source.ctf.fs(7) manual page."); BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(fs, ctf_fs_init); BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD(fs, ctf_fs_query); BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(fs, ctf_fs_finalize); @@ -62,13 +64,18 @@ BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(fs, ctf_fs_sink_init); BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(fs, ctf_fs_sink_finalize); BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(fs, ctf_fs_sink_graph_is_configured); -BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(fs, "Write CTF traces to the file system."); +BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(fs, + "Write CTF traces to the file system."); +BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(fs, + "See the babeltrace2-sink.ctf.fs(7) manual page."); /* ctf.lttng-live source */ BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, lttng_live, "lttng-live", lttng_live_msg_iter_next); BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION_WITH_ID(auto, lttng_live, "Connect to an LTTng relay daemon and receive CTF streams."); +BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP_WITH_ID(auto, lttng_live, + "See the babeltrace2-source.ctf.lttng-live(7) manual page."); BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, lttng_live, lttng_live_component_init); BT_PLUGIN_SOURCE_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, lttng_live, diff --git a/src/plugins/lttng-utils/plugin.c b/src/plugins/lttng-utils/plugin.c index 8d50b0e8..9302a5ea 100644 --- a/src/plugins/lttng-utils/plugin.c +++ b/src/plugins/lttng-utils/plugin.c @@ -35,14 +35,16 @@ BT_PLUGIN_MODULE(); /* Initialize plug-in entry points. */ BT_PLUGIN_WITH_ID(lttng_utils, "lttng-utils"); -BT_PLUGIN_DESCRIPTION_WITH_ID(lttng_utils, "LTTng utilities"); -BT_PLUGIN_AUTHOR_WITH_ID(lttng_utils, "Julien Desfossez"); +BT_PLUGIN_DESCRIPTION_WITH_ID(lttng_utils, "LTTng-specific graph utilities"); +BT_PLUGIN_AUTHOR_WITH_ID(lttng_utils, "EfficiOS "); BT_PLUGIN_LICENSE_WITH_ID(lttng_utils, "MIT"); BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(lttng_utils, debug_info, "debug-info", debug_info_msg_iter_next); BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION_WITH_ID(lttng_utils, debug_info, "Augment compatible events with debugging information."); +BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP_WITH_ID(lttng_utils, debug_info, + "See the babeltrace2-filter.lttng-utils.debug-info(7) manual page."); BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(lttng_utils, debug_info, debug_info_comp_init); BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD_WITH_ID(lttng_utils, diff --git a/src/plugins/text/plugin.c b/src/plugins/text/plugin.c index 0c474d30..097226dc 100644 --- a/src/plugins/text/plugin.c +++ b/src/plugins/text/plugin.c @@ -30,8 +30,8 @@ BT_PLUGIN_MODULE(); #endif BT_PLUGIN(text); -BT_PLUGIN_DESCRIPTION("Plain text component classes"); -BT_PLUGIN_AUTHOR("Julien Desfossez, Mathieu Desnoyers, Philippe Proulx"); +BT_PLUGIN_DESCRIPTION("Plain text input and output"); +BT_PLUGIN_AUTHOR("EfficiOS "); BT_PLUGIN_LICENSE("MIT"); /* pretty sink */ @@ -42,11 +42,15 @@ BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(pretty, pretty_graph_is_configured); BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(pretty, "Pretty-print messages (`text` format of Babeltrace 1)."); +BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(pretty, + "See the babeltrace2-sink.text.pretty(7) manual page."); /* dmesg source */ BT_PLUGIN_SOURCE_COMPONENT_CLASS(dmesg, dmesg_msg_iter_next); BT_PLUGIN_SOURCE_COMPONENT_CLASS_DESCRIPTION(dmesg, - "Read a dmesg output from a file or from standard input."); + "Read Linux ring buffer lines (dmesg(1) output) from a file or from standard input."); +BT_PLUGIN_SOURCE_COMPONENT_CLASS_HELP(dmesg, + "See the babeltrace2-source.text.dmesg(7) manual page."); BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(dmesg, dmesg_init); BT_PLUGIN_SOURCE_COMPONENT_CLASS_FINALIZE_METHOD(dmesg, dmesg_finalize); BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(dmesg, @@ -66,3 +70,5 @@ BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(details, details_graph_is_configured); BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(details, "Print messages with details."); +BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(details, + "See the babeltrace2-sink.text.details(7) manual page."); diff --git a/src/plugins/utils/plugin.c b/src/plugins/utils/plugin.c index d6b5b244..3a3932d1 100644 --- a/src/plugins/utils/plugin.c +++ b/src/plugins/utils/plugin.c @@ -31,8 +31,8 @@ BT_PLUGIN_MODULE(); #endif BT_PLUGIN(utils); -BT_PLUGIN_DESCRIPTION("Graph utilities"); -BT_PLUGIN_AUTHOR("Julien Desfossez, Jérémie Galarneau, Philippe Proulx"); +BT_PLUGIN_DESCRIPTION("Common graph utilities"); +BT_PLUGIN_AUTHOR("EfficiOS "); BT_PLUGIN_LICENSE("MIT"); /* sink.utils.dummy */ @@ -43,6 +43,8 @@ BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(dummy, dummy_graph_is_configured); BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(dummy, "Consume messages and discard them."); +BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(dummy, + "See the babeltrace2-sink.utils.dummy(7) manual page."); /* sink.utils.counter */ BT_PLUGIN_SINK_COMPONENT_CLASS(counter, counter_consume); @@ -51,12 +53,16 @@ BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(counter, counter_finalize); BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(counter, counter_graph_is_configured); BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(counter, - "Count messages and print the results."); + "Count messages and print the statistics."); +BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(counter, + "See the babeltrace2-sink.utils.counter(7) manual page."); /* flt.utils.trimmer */ BT_PLUGIN_FILTER_COMPONENT_CLASS(trimmer, trimmer_msg_iter_next); BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(trimmer, - "Keep messages that occur within a specific time range."); + "Discard messages that occur outside a specific time range."); +BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(trimmer, + "See the babeltrace2-filter.utils.trimmer(7) manual page."); BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(trimmer, trimmer_init); BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(trimmer, trimmer_finalize); BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(trimmer, @@ -68,6 +74,8 @@ BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD(trimmer, BT_PLUGIN_FILTER_COMPONENT_CLASS(muxer, muxer_msg_iter_next); BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION(muxer, "Sort messages from multiple input ports to a single output port by time."); +BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(muxer, + "See the babeltrace2-filter.utils.muxer(7) manual page."); BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(muxer, muxer_init); BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(muxer, muxer_finalize); BT_PLUGIN_FILTER_COMPONENT_CLASS_INPUT_PORT_CONNECTED_METHOD(muxer, diff --git a/tests/bindings/python/bt2/test_plugin.py b/tests/bindings/python/bt2/test_plugin.py index 7be8b480..a838b9cf 100644 --- a/tests/bindings/python/bt2/test_plugin.py +++ b/tests/bindings/python/bt2/test_plugin.py @@ -101,13 +101,13 @@ class PluginTestCase(unittest.TestCase): self.assertTrue(plugin_path.startswith(plugin_path_env)) def test_author(self): - self.assertTrue('Philippe Proulx' in self._plugin.author) + self.assertEqual(self._plugin.author, 'EfficiOS ') def test_license(self): - self.assertTrue('MIT' in self._plugin.license) + self.assertEqual(self._plugin.license, 'MIT') def test_description(self): - self.assertTrue('CTF source and sink support' in self._plugin.description) + self.assertEqual(self._plugin.description, 'CTF input and output') def test_version(self): self.assertIsNone(self._plugin.version) -- 2.34.1