morningman opened a new pull request, #19219: URL: https://github.com/apache/doris/pull/19219
# Proposed changes Subtask of #19195 ## Problem summary This PR mainly changes: ### Add new classes for Profile Previously, we use `RuntimeProfile` class directly, and because there are multiple level in profile, so you can see there may be several `RuntimeProfile` instances be to maintain. I created several new classes for profile: ``` class Profile: The root profile of a execution task(query or load) class SummaryProfile: The profile that contains summary info of a execution task, such as start time, end time, query id. etc. class ExecutionProfile: The profile for a single Coordinator. Each Coordinator will have a ExecutionProfile. ``` The profile structure is as following: ``` Profile: SummaryProfile: ExecutionProfile 1: Fragment 0: Instance 0: Instance 1: ... Fragment 1: ... ExecutionProfile 2: ... ``` You can see, each `Profile` has a `SummaryProfile` and one or more `ExecutionProfile`. For most kinds of job, such as query/insert, there is only one `ExecutionProfile`. But for broker load job, will may be more than one `ExecutionProfile`, corresponding to each sub task of the load job. ### How to use 1. For query/insert, etc: - Each `StmtExcutor` will have a `Profile` instance. - Each `Coordinator` will have a `ExecutionProfile` instance. - `StmtExcutor` is responsible for the `SummaryProfile`, it will update the `SummaryProfile` during the execution. - `Coordinator` is responsible for the `ExecutionProfile`, it will first add `ExecutionProfile` to the child of `Profile`, and update the `ExecutionProfile` periodically during the execution. 2. For Load/Export, etc: - Each job will hava a `Profile` instance. - For each `Coordinator` of this job, add its `ExecutionProfile` to the children of job's `Profile`. ## Checklist(Required) * [ ] Does it affect the original behavior * [ ] Has unit tests been added * [ ] Has document been added or modified * [ ] Does it need to update dependencies * [ ] Is this PR support rollback (If NO, please explain WHY) ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc... -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org