morningman commented on a change in pull request #5948:
URL: https://github.com/apache/incubator-doris/pull/5948#discussion_r645930945



##########
File path: 
fe/fe-core/src/main/java/org/apache/doris/common/util/ProfileManager.java
##########
@@ -132,8 +134,15 @@ public void pushProfile(RuntimeProfile profile) {
         if (profile == null) {
             return;
         }
-        
+
+        // filter profile that take more time than threshold
         ProfileElement element = createElement(profile);

Review comment:
       Currently, Doris will call this `pushProfile()` at 3 phases:
   1. The beginning of the query.
   2. During the query execution(report incremental)
   3. The end of the query.
   
   At phase 1 and 2, the `element.totalTimeMs` may be very small. so you may 
not be able to see the profile of current running queries. This is not a very 
big problem because it will be pushed successfully at phase 3, finally.
   But can we change it like:
   
   1. Allow pushing at phase 1 and 2, no matter what `element.totalTimeMs` is.
   2. At phase 3, check the threshold and determine to push the final profile, 
or to delete it if the query time is too small.

##########
File path: docs/zh-CN/administrator-guide/variables.md
##########
@@ -234,7 +235,13 @@ SELECT /*+ SET_VAR(query_timeout = 1, 
enable_partition_cache=true) */ sleep(3);
     
     `fe_host:fe_http_port/query`
     
-    其中会显示最近100条,开启 `is_report_success` 的查询的 profile。
+    其中默认会显示最近100条(可以通过`reporty_query_array_size`进行设置),开启 `is_report_success` 
的查询的 profile。

Review comment:
       I think it's better to be a fe configuration, not session variable?

##########
File path: docs/zh-CN/administrator-guide/variables.md
##########
@@ -68,6 +68,7 @@ SET GLOBAL exec_mem_limit = 137438953472
 * `wait_timeout`
 * `sql_mode`
 * `is_report_success`
+* `report_query_time_threshold`

Review comment:
       ```suggestion
   * `report_query_time_threshold_second`
   ```
   Using second is more clear and easy to use.




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

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