git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Patrick Steinhardt <ps@pks.im>
Date
Apr 22, 2025, 06:50 UTC
Message-ID
<20250422-pks-meson-benchmarks-v3-0-7aad68bac6fd@pks.im>
In-Reply-To
<20250331-pks-meson-benchmarks-v1-0-b2ace85616a3@pks.im>
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/20250331-pks-meson-benchmarks-v1-0-b2ace85616a3@pks.im
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/20250414-pks-meson-benchmarks-v2-0-04377080a167@pks.im
Thanks!
Patrick
---
Patrick Steinhardt (5):
      t/perf: fix benchmarks with alternate repo formats
      t/perf: use configured PERL_PATH
      t/perf: fix benchmarks with out-of-tree builds
      meson: wire up benchmarks
      meson: wire up benchmarking options
 meson.build           | 13 +++++++--
 meson_options.txt     |  6 ++++
 t/meson.build         | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++
 t/perf/aggregate.perl |  2 +-
 t/perf/perf-lib.sh    | 32 ++++++++++++++++++---
 t/perf/run            |  4 +--
 6 files changed, 124 insertions(+), 10 deletions(-)
Range-diff versus v2:
1:  dad3c5a3e78 = 1:  85098f35716 t/perf: fix benchmarks with alternate repo formats
2:  42284091b9c = 2:  457ea957acf t/perf: use configured PERL_PATH
3:  d03ca0c0630 ! 3:  a66bc5aaf51 t/perf: fix benchmarks with out-of-tree builds
    @@ Commit message
         assumption breaks with both CMake and Meson, where the build directory
         can be located in an arbitrary place.
     
    -    Adapt the script so that it works with out-of-tree builds. This prepares
    -    us for wiring up benchmarks in Meson.
    +    Adapt the script so that it works with out-of-tree builds. Most
    +    importantly, this requires us to figure out the location of the build
    +    directory:
    +
    +      - When running benchmarks via our Makefile the build directory is the
    +        same as the source directory. We already know to derive the test
    +        directory ("t/") via `$(pwd)/..`, which works because we chdir into
    +        "t/perf" before executing benchmarks. We can thus derive the build
    +        directory by appending another "/.." to that path.
    +
    +      - When running benchmarks via Meson the build directory is located at
    +        an arbitrary location. The build system thus has to make the path
    +        known by exporting the `GIT_BUILD_DIR` environment variable.
    +
    +    This change prepares us for wiring up benchmarks in Meson.
     
         Signed-off-by: Patrick Steinhardt <ps@pks.im>
     
4:  14945278066 ! 4:  386b960f3e1 meson: wire up benchmarks
    @@ Commit message
         tests are also accepted when running benchmarks.
     
         Note that the benchmarking target is somewhat limited because it will
    -    only run benchmarks for the current build. Other usecases, like running
    +    only run benchmarks for the current build. Other use cases, like running
         benchmarks against multiple different versions of Git, are not currently
    -    supported. Users should continue to use "t/perf/run" for those usecases.
    -    The script should get extended at one point in time to support Meson,
    -    but this is outside of the scope of this series.
    +    supported. Users should continue to use "t/perf/run" for those use
    +    cases. The script should get extended at one point in time to support
    +    Meson, but this is outside of the scope of this series.
     
         Signed-off-by: Patrick Steinhardt <ps@pks.im>
     
      ## meson.build ##
    +@@
    + #      # Execute single test interactively such that features like `debug ()` work.
    + #      $ meson test -i --test-args='-ix' t1400-update-ref
    + #
    ++#      # Execute all benchmarks.
    ++#      $ meson test -i --benchmark
    ++#
    ++#      # Execute single benchmark.
    ++#      $ meson test -i --benchmark p0000-*
    ++#
    + #   Test execution is parallelized by default and scales with the number of
    + #   processor cores available. You can change the number of processes by passing
    + #   the `-jN` flag to `meson test`.
     @@ meson.build: git = find_program('git', dirs: program_path, required: false)
      sed = find_program('sed', dirs: program_path)
      shell = find_program('sh', dirs: program_path)
5:  101be1e8efc = 5:  cc3e771ada0 meson: wire up benchmarking options

--- base-commit: 683c54c999c301c2cd6f715c411407c413b1d84e change-id: 20250328-pks-meson-benchmarks-a8fac5f69467

Previous: Junio C HamanoNext: Patrick Steinhardt
Message 30 of 62 in “meson: wire up support for benchmarks”
  1. 0/5 meson: wire up support for benchmarksPatrick Steinhardt, Mar 31, 2025
  2. 1/5 t/perf: fix benchmarks with alternate repo formatsPatrick Steinhardt, Mar 31, 2025
  3. 2/5 t/perf: use configured PERL_PATHPatrick Steinhardt, Mar 31, 2025
  4. Toon ClaesApr 10, 2025
  5. Patrick SteinhardtApr 14, 2025
  6. Junio C HamanoApr 14, 2025
  7. Patrick SteinhardtApr 15, 2025
  8. 3/5 t/perf: fix benchmarks with out-of-tree buildsPatrick Steinhardt, Mar 31, 2025
  9. Toon ClaesApr 10, 2025
  10. Toon ClaesApr 14, 2025
  11. Patrick SteinhardtApr 14, 2025
  12. 4/5 meson: wire up benchmarksPatrick Steinhardt, Mar 31, 2025
  13. Toon ClaesApr 10, 2025
  14. Patrick SteinhardtApr 14, 2025
  15. Toon ClaesApr 14, 2025
  16. 5/5 meson: wire up benchmarking optionsPatrick Steinhardt, Mar 31, 2025
  17. 0/5 meson: wire up support for benchmarksPatrick Steinhardt, Apr 14, 2025
  18. 1/5 t/perf: fix benchmarks with alternate repo formatsPatrick Steinhardt, Apr 14, 2025
  19. 2/5 t/perf: use configured PERL_PATHPatrick Steinhardt, Apr 14, 2025
  20. 3/5 t/perf: fix benchmarks with out-of-tree buildsPatrick Steinhardt, Apr 14, 2025
  21. Christian CouderApr 20, 2025
  22. Patrick SteinhardtApr 22, 2025
  23. 4/5 meson: wire up benchmarksPatrick Steinhardt, Apr 14, 2025
  24. Christian CouderApr 20, 2025
  25. 5/5 meson: wire up benchmarking optionsPatrick Steinhardt, Apr 14, 2025
  26. Junio C HamanoApr 15, 2025
  27. Junio C HamanoApr 15, 2025
  28. Patrick SteinhardtApr 16, 2025
  29. Junio C HamanoApr 18, 2025
  30. 0/5 meson: wire up support for benchmarksPatrick Steinhardt, Apr 22, 2025
  31. 2/5 t/perf: use configured PERL_PATHPatrick Steinhardt, Apr 22, 2025
  32. 1/5 t/perf: fix benchmarks with alternate repo formatsPatrick Steinhardt, Apr 22, 2025
  33. 3/5 t/perf: fix benchmarks with out-of-tree buildsPatrick Steinhardt, Apr 22, 2025
  34. 4/5 meson: wire up benchmarksPatrick Steinhardt, Apr 22, 2025
  35. 5/5 meson: wire up benchmarking optionsPatrick Steinhardt, Apr 22, 2025
  36. Christian CouderApr 22, 2025
  37. Patrick SteinhardtApr 22, 2025
  38. Christian CouderApr 23, 2025
  39. Patrick SteinhardtApr 24, 2025
  40. Christian CouderApr 24, 2025
  41. Junio C HamanoApr 24, 2025
  42. Patrick SteinhardtApr 24, 2025
  43. Toon ClaesApr 23, 2025
  44. 0/5 meson: wire up support for benchmarksPatrick Steinhardt, Apr 25, 2025
  45. 1/5 t/perf: fix benchmarks with alternate repo formatsPatrick Steinhardt, Apr 25, 2025
  46. 2/5 t/perf: use configured PERL_PATHPatrick Steinhardt, Apr 25, 2025
  47. 3/5 t/perf: fix benchmarks with out-of-tree buildsPatrick Steinhardt, Apr 25, 2025
  48. 4/5 meson: wire up benchmarksPatrick Steinhardt, Apr 25, 2025
  49. Christian CouderApr 25, 2025
  50. Patrick SteinhardtApr 25, 2025
  51. Christian CouderApr 25, 2025
  52. Patrick SteinhardtApr 25, 2025
  53. 5/5 meson: wire up benchmarking optionsPatrick Steinhardt, Apr 25, 2025
  54. Christian CouderApr 25, 2025
  55. Patrick SteinhardtApr 25, 2025
  56. Christian CouderApr 25, 2025
  57. 0/5 meson: wire up support for benchmarksPatrick Steinhardt, Apr 28, 2025
  58. 1/5 t/perf: fix benchmarks with alternate repo formatsPatrick Steinhardt, Apr 28, 2025
  59. 2/5 t/perf: use configured PERL_PATHPatrick Steinhardt, Apr 28, 2025
  60. 3/5 t/perf: fix benchmarks with out-of-tree buildsPatrick Steinhardt, Apr 28, 2025
  61. 4/5 meson: wire up benchmarksPatrick Steinhardt, Apr 28, 2025
  62. 5/5 meson: wire up benchmarking optionsPatrick Steinhardt, Apr 28, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.