[libcxx-commits] [libcxx] 070d708 - [libc++] Minor tweaks to run-benchbot (#191233)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 9 09:10:34 PDT 2026
Author: Louis Dionne
Date: 2026-04-09T12:10:29-04:00
New Revision: 070d708d86629d8c8deae2a95c6e071f30ba9c5c
URL: https://github.com/llvm/llvm-project/commit/070d708d86629d8c8deae2a95c6e071f30ba9c5c
DIFF: https://github.com/llvm/llvm-project/commit/070d708d86629d8c8deae2a95c6e071f30ba9c5c.diff
LOG: [libc++] Minor tweaks to run-benchbot (#191233)
- Support multiple runs of run-benchbot on the same commit
- Add support for passing a path to SPEC
Added:
Modified:
libcxx/utils/ci/lnt/run-benchbot
Removed:
################################################################################
diff --git a/libcxx/utils/ci/lnt/run-benchbot b/libcxx/utils/ci/lnt/run-benchbot
index 0b501133ed209..266a064f4987f 100755
--- a/libcxx/utils/ci/lnt/run-benchbot
+++ b/libcxx/utils/ci/lnt/run-benchbot
@@ -29,6 +29,10 @@ ${PROGNAME} [options] <BUILDER> [-- commit ...]
[--lnt-url <URL>] The optional URL of the LNT instance to submit results to. By
default, results are not submitted to any LNT instance.
+Environment variables
+SPEC_DIR Optional path to a SPEC installation. If set and the directory
+ exists, SPEC benchmarks are included in the run.
+
If commits are provided after --, only those commits are benchmarked and the
runner exits. Otherwise, the runner polls the given LNT url (which must be
present) to discover un-benchmarked commits and runs indefinitely.
@@ -101,14 +105,33 @@ LNT_TEST_SUITE=libcxx2
mkdir -p "${BUILD_DIR}"
+# Given path/to/abcdef.json, figures out the next available path,
+# considering path/to/abcdef.{1,2,3,etc}.json.
+next_available_path() {
+ local path="${1}"
+ local base="${path%.json}"
+ local i=1
+ while [ -f "${path}" ]; do
+ path="${base}.${i}.json"
+ i=$((i + 1))
+ done
+ echo "${path}"
+}
+
run_benchmarks() {
- local output="${BUILD_DIR}/${1}.json"
+ local spec_arg=""
+ if [ -d "${SPEC_DIR}" ]; then
+ spec_arg="--spec-dir ${SPEC_DIR}"
+ fi
+
+ local output=$(next_available_path "${BUILD_DIR}/${1}.json")
${MONOREPO_ROOT}/libcxx/utils/ci/lnt/run-benchmarks \
--test-suite-commit ${BENCHMARK_SUITE_VERSION} \
--git-repo ${MONOREPO_ROOT} \
--machine ${BUILDER} \
--compiler ${COMPILER} \
--benchmark-commit ${1} \
+ ${spec_arg} \
--output ${output}
if [ -n "${LNT_URL}" ]; then
More information about the libcxx-commits
mailing list