Subject: Re: [PATCH v3 0/5] meson: wire up support for benchmarks

From: Patrick Steinhardt <[email-masked]>
Date: Tue, 22 Apr 2025 09:53:26 +0200

On Tue, Apr 22, 2025 at 09:27:57AM +0200, Christian Couder wrote:
> On Tue, Apr 22, 2025 at 8:50 AM Patrick Steinhardt <[email-masked]> wrote:
> >
> > Hi,
> >
> > this small patch series implements support for running our benchmarks in
> > "t/perf" via Meson. The series does not aim to replace "t/perf/run",
> > which is more fully-featured and allows running benchmarks against
> > multiple different trees. Instead, this series only allows running the
> > benchmarks against the current tree. Users are thus expected to continue
> > using "t/perf/run" for more advanced usecases.
> >
> > Changes in v2:
> >   - Adapt "aggregate.perl" to use a "/usr/bin/env perl" shebang.
> >   - Link to v1: https://lore.kernel.org/r/[email-masked]
> >
> > Changes in v3:
> >   - Document how to run benchmarks in "meson.build".
> >   - Expand the message for the commit that enables out-of-tree
> >     benchmarking.
> >   - Link to v2: https://lore.kernel.org/r/[email-masked]
> 
> In https://lore.kernel.org/git/CAP8UFD2jKwYzmc40knXY7k+FQabjZbGTqs9fowF=[email-masked]/
> I wrote:
> 
> "I wonder what happens when we run `meson test -C build --benchmark`
> but 'time' is not found."
> 
> because I wasn't sure if it would just do nothing in that case which
> might not be very user friendly.

Ah, sorry, forgot to answer that question. What Meson does in that case
is to print "No tests defined". We could help improve usability a bit by
printing benchmarks as part of the auto-detected features after setup of
the build directory has finished. That would make it more discoverable
that benchmarks have been disabled.

Patrick