tests: Replace babelstats.pl with bt2 plugins Observed Issue ============== `tests/regression/tools/filtering/test_valid_filters` is a long running test, especially when running as root and exercising the tests across the kernel domain. I observed that a sizable amount of time was being spent in the analysis of the results using `babelstats.pl`. Solution ======== Instead of using a script to parse the pretty output of babeltrace2, I decided to write two C++ plugins to replicate the behaviour of the `babelstats.pl` script. I measured the time using `sudo -E time ./path/to/test` | Test | Time with `babelstats.pl` | Time with bt2 plugins | | test_tracefile_count | 13.04s | 11.73s | | test_exclusion | 22.75s | 22.07s | | test_valid_filter | 301.04s | 144.41s | The switch to using babeltrace2 plugins reduces the runtime of the `test_valid_filter` test (when running with kernel tests) by half. The runtime changes to the other tests that were modified are not significant. Known drawbacks =============== The field_stats plugin behaviour differs from `babelstats.pl` with regards to enumeration fields ("container" in `babelstats.pl`). However, no tests depend on that behaviour to pass. The field_stats sink plugin doesn't perform a lot of run-time error-checking of functions it invokes, and doesn't fully clean up all the references it allocates though the babeltrace2 API. As the intended usage is for short lived invocations with relatively small traces, the principal drawback of this approach is that errors in the plugin may be harder to debug. Building tests of lttng-tools will now depend on having the babeltrace2 development headers and libraries available. Change-Id: Ie8ebdd255b6901a7d0d7c4cd584a02096cccd4fb Signed-off-by: Kienan Stewart <kstewart@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Docs: Add the example commit from CONTRIBUTING as a template Observed issue ============== I found myself referring to the contributing guide each time a made a new commit to ensure that I had the appropriate style and sections. Solution ======== A stub template `.commit_template` has been added and the instructions in `CONTRIBUTING.md` indicate that the local checkout that be configured to use it as a template for new commits which are made. Known drawbacks =============== None. Change-Id: Idfacd4d726657cb57f193f0a3375a840d8a9c746 Signed-off-by: Kienan Stewart <kstewart@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
docs: Update contributing guide Indicate that Gerrit (https://review.lttng.org) is the principal place where patches are submitted and reviewed, rather than the mailing list. Based on feedback received on the mailing list: https://lists.lttng.org/pipermail/lttng-dev/2023-November/030670.html Change-Id: Icb0bc3e45bb35fa85eca272d8043e5553465f700 Signed-off-by: Kienan Stewart <kstewart@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
CONTRIBUTING.md: harmonize list style with the rest of the docs Append full stops (periods, for our non-British friends) and capitalize list elements as they are complete sentences on their own. Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Change-Id: I7646cafa8a23a3dc6cfabea2dd5a54ce244eb2b3
CONTRIBUTING.md: clarify the guidelines for commit messages In order to streamline the code review process, I am adding a more detailed explanation of the desired commit message format. Of note, the commit title format `Fix: sub-system`, used informally for a couple of months, is adopted for bug fixes. A template of the sections expected in the commit message body of those patches is also included. More general guidelines are also added for feature contributions. Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Change-Id: Id0097949ca984e88367e8e78cb6111adb30c5b99