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

   ### What problem does this PR solve?
   
   1. Centralize counter name constants:
      - Create `runtime_profile_counter_names.h` with all counter name constants
        under `doris::profile` namespace.
      - Replace hardcoded counter name strings in operator.cpp, operator.h,
        pipeline_task.cpp, scan_operator.cpp, spill_utils.h, and dependency.h.
   2. Unify profile node naming to [Name(key=value, 
key=value)](cci:1://file:///mnt/disk1/yy/git/wt-update-profile/fe/fe-core/src/main/java/org/apache/doris/common/profile/RuntimeProfile.java:174:4-176:5)
 format:
      - Pipeline: `"Pipeline : X"` -> `"Pipeline(id=X)"`
      - Fragment: `"PipelineX  X"` -> `"PipelineX(fragment_id=X)"`
      - Operators: `"(nereids_id=X)(id=Y)"` -> `"(nereids_id=X, id=Y)"`
      - Scan operators: add `id=` field, fix `.` separator to `,`
      - ExchangeSink: add `id=` and `nereids_id=` fields
      - MultiCastSink: `"(dest_id=a, dest_id=b)(id=X)"` -> `"(id=X, 
dest_ids=[a,b])"`
      - Remove legacy `operator_name_suffix` and `exchange_sink_name_suffix` 
constants.
   3. Deduplicate spill counters:
      - Create 
[SpillWriteCounters](cci:2://file:///mnt/disk1/yy/git/wt-update-profile/be/src/exec/operator/spill_counters.h:25:0-54:1)
 and 
[SpillReadCounters](cci:2://file:///mnt/disk1/yy/git/wt-update-profile/be/src/exec/operator/spill_counters.h:57:0-92:1)
 structs in
        
[spill_counters.h](cci:7://file:///mnt/disk1/yy/git/wt-update-profile/be/src/exec/operator/spill_counters.h:0:0-0:0)
 to eliminate duplicated counter definitions between
        
[PipelineXSpillLocalState](cci:2://file:///mnt/disk1/yy/git/wt-update-profile/be/src/exec/operator/operator.h:359:0-464:2)
 and 
[PipelineXSpillSinkLocalState](cci:2://file:///mnt/disk1/yy/git/wt-update-profile/be/src/exec/operator/operator.h:728:0-805:2).
      - Use reference aliases for backward compatibility.
   4. Enable level filtering in 
[pretty_print()](cci:1://file:///mnt/disk1/yy/git/wt-update-profile/be/src/runtime/runtime_profile.cpp:608:0-668:1):
      - Add `RuntimeProfileCounterTreeNode::pretty_print()` method.
      - 
[pretty_print()](cci:1://file:///mnt/disk1/yy/git/wt-update-profile/be/src/runtime/runtime_profile.cpp:608:0-668:1)
 now builds counter tree, prunes by `profile_level`,
        and prints from pruned tree, consistent with 
[to_thrift()](cci:1://file:///mnt/disk1/yy/git/wt-update-profile/be/src/runtime/runtime_profile.cpp:675:0-714:1)/[to_proto()](cci:1://file:///mnt/disk1/yy/git/wt-update-profile/be/src/runtime/runtime_profile.cpp:721:0-761:1).
   5. Adapt FE parsing:
      - Optimize 
[shouldBeIncluded()](cci:1://file:///mnt/disk1/yy/git/wt-update-profile/fe/fe-core/src/main/java/org/apache/doris/common/profile/RuntimeProfile.java:498:4-504:5)
 from regex to `startsWith`/`contains`.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


-- 
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