[feature](build) Add build profiling support via DORIS_BUILD_PROFILE#61410
Merged
hello-stephen merged 4 commits intoapache:masterfrom Mar 17, 2026
Merged
[feature](build) Add build profiling support via DORIS_BUILD_PROFILE#61410hello-stephen merged 4 commits intoapache:masterfrom
hello-stephen merged 4 commits intoapache:masterfrom
Conversation
Add optional build profiling that records build metadata (user, base branch, commit, modified files, duration, exit code, load average) to .build_profile.jsonl. Controlled by DORIS_BUILD_PROFILE env var set in custom_env.sh, zero impact when not enabled. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Collaborator
Author
|
run buildall |
Print a warning and disable profiling instead of failing the build. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…le.sh Move all profiling logic from build.sh into build_profile.sh with set +e, so profiling failures can never affect the build. Use PID-based state files to avoid concurrent build conflicts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
|
run buildall |
…ile.sh - Skip non _BP_* lines when reading state file to avoid eval errors - Fix load_avg regex to handle both Linux and macOS uptime output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
|
run buildall |
TPC-H: Total hot run time: 26787 ms |
TPC-DS: Total hot run time: 167847 ms |
Contributor
|
PR approved by anyone and no changes requested. |
hello-stephen
approved these changes
Mar 17, 2026
Contributor
|
PR approved by at least one committer and no changes requested. |
github-actions bot
pushed a commit
that referenced
this pull request
Mar 17, 2026
…61410) ## Summary - Add optional build profiling to `build.sh`, gated by `DORIS_BUILD_PROFILE` environment variable - Records build metadata (user, base branch, commit, modified files, duration, exit code, load average) as JSON Lines to `.build_profile.jsonl` - Auto-detects base branch (master/branch-x.y/branch-selectdb-doris-x.y) by finding the closest remote main branch - Only tracks files modified since last build (mtime > last_build_time) - Zero impact when `DORIS_BUILD_PROFILE` is not set — no behavior change for external users ## Deployment Set in `custom_env.sh` on dev machines (no root required): ```bash echo "export DORIS_BUILD_PROFILE=1" >> custom_env.sh ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build.sh, gated byDORIS_BUILD_PROFILEenvironment variable.build_profile.jsonlDORIS_BUILD_PROFILEis not set — no behavior change for external usersDeployment
Set in
custom_env.shon dev machines (no root required):Test plan
DORIS_BUILD_PROFILE=1, verify.build_profile.jsonlis created with correct fieldsDORIS_BUILD_PROFILE, verify no side effects🤖 Generated with Claude Code