morningman opened a new pull request, #71389:
URL: https://github.com/apache/doris/pull/71389

   ### Background
   
   `build.sh --compile-bench` times a cold BE build and records individual 
compiler and linker invocations. Contributors build the BE unit-test executable 
through `run-be-ut.sh`, which compiles the test sources alongside the BE 
sources. On macOS arm64, CMake runs `dsymutil` and `llvm-strip` after linking 
the test executable.
   
   ### What problem does this PR solve?
   
   Issue Number: #71314
   Related PR: #66616 (adds BE compile timing), #61291 (switches macOS ANN 
tests to `-force_load`), #66615 (adds target ordering for that archive)
   PR Type: Build/CI/Chore
   
   Problem Summary:
   
   Contributors need to measure a cold BE unit-test build without reusing 
ccache entries or deleting their incremental build. `run-be-ut.sh 
--compile-bench` reuses the BE timing tools and reports compile time by source 
area and time spent after linking. On macOS, rebuilding only an ANN test can 
also leave `doris_be_test` stale. The executable link now tracks the ANN 
archive as an input.
   
   ### Details
   
   - **Change map:**
     - Compile-bench entry point and reporting, +439/-35. Includes 183 lines of 
shell and Python self-tests and 30 changed lines of documentation.
     - macOS incremental relinking, +5. Adds the ANN archive to the 
executable's link dependencies.
   - **Affected:** Local BE and BE unit-test tooling on Linux and macOS. The 
reporting tools use Python 3. The link dependency correction applies to macOS. 
CI uses the ordinary unit-test invocation.
   - **Developer and release impact:** `./run-be-ut.sh --compile-bench -j 6` 
recreates `be/ut_build_<type>_compile_bench`, builds the executable, and writes 
text and JSON reports. Budget about one additional unit-test build directory of 
disk space. No release process changes.
   - **License and third-party:** None.
   - **Rollback:** Revert the commits. The generated benchmark directory and 
reports can be removed separately.
   
   ### Testing
   
   - Both compile-bench self-tests pass on macOS. The new self-test rejects the 
baseline helpers and verifies source grouping, compatibility of the BE caller, 
and post-link reporting.
   - The CLI rejects `--compile-bench --run` and `--compile-bench 
--jemalloc-hook` with exit code 1.
   - A complete macOS arm64 ASAN run of `./run-be-ut.sh --compile-bench -j 6` 
recreated its dedicated directory and produced text and JSON reports with 
`be/src`, `be/test`, and post-link entries. The ordinary build artifacts kept 
their timestamps and sizes. The comparison command accepted a summary generated 
by the baseline reporter.
   - The baseline Ninja graph lists the ANN archive as order-only. After the 
fix, touching only `faiss_vector_index_test.cpp` rebuilt the object and 
archive, then relinked `doris_be_test` with the ordinary unit-test command.
   - The same 247 cases across the ANN suites and `CodingTest` passed on macOS 
arm64 ASAN in registration order and with shuffle seed 48256. Linux CI is 
pending.
   - Shell syntax, ShellCheck on the entry point and self-test, and BE build 
hygiene pass. The shared helper has the same ShellCheck diagnostics as the 
baseline.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Behavior changed: No
   - Does this need documentation: No (developer usage is documented in 
`build-support/compile-bench/README.md`)
   - Pre-submission status: Ready
   
   ### AI Disclosure
   
   - Tool: Claude Code (Claude Opus 5.5), OpenAI Codex
   - Generated: Claude Code wrote the original build changes and self-test. 
Codex ported the commits, verified the split branch, and wrote the PR 
description.
   - Human review: not stated
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to