Surya Hebbar has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/20008 )

Change subject: IMPALA-12182: Add CPU utilization chart for RuntimeProfile's 
sampled metrics
......................................................................


Patch Set 1:

(13 comments)

> (8 comments)
 >
 > Tried to apply your patch on my local environment with Ubuntu
 > 18.04. But the CPU utilization chart was not shown on the query
 > timeline web page so I cannot verify if the implementation is
 > correct.

Apologies for not mentioning. Please ensure RESOURCE_TRACE_RATIO is set to 1, 
to achieve a probability of 1 for tracing resources for all queries.

http://gerrit.cloudera.org:8080/#/c/20008/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/20008/1//COMMIT_MSG@9
PS1, Line 9: user,
           : sys and iowait
> Spell out the counter names from query profile. Also, mention that query op
Okay. I will mention the query option and associated counter names.


http://gerrit.cloudera.org:8080/#/c/20008/1//COMMIT_MSG@15
PS1, Line 15: AggregatedRuntimeProfile
> Is this accurate? I thought AggregatedRuntimeProfile is only used in V2 que
Please check the `SerializeToArchiveString` method in `runtime-profile.cc`, it 
is retrieving the BASE64 encoded values from `Compress()` method. This handle 
is present on the webUI page with `query_profile_encoded` handle.

But, yes. The same profile containing AggregatedRuntimeProfile is available 
with the above flag.


http://gerrit.cloudera.org:8080/#/c/20008/1/LICENSE.txt
File LICENSE.txt:

http://gerrit.cloudera.org:8080/#/c/20008/1/LICENSE.txt@1123
PS1, Line 1123: Permission is hereby granted, free of charge, to any person 
obtaining a copy of this software and a
> Please wrap up the long lines and keep indents as other licenses.
Okay.


http://gerrit.cloudera.org:8080/#/c/20008/1/www/query_timeline.tmpl
File www/query_timeline.tmpl:

http://gerrit.cloudera.org:8080/#/c/20008/1/www/query_timeline.tmpl@559
PS1, Line 559:
> Whitespaces can be removed in if clause here and other places?
Okay.


http://gerrit.cloudera.org:8080/#/c/20008/1/www/query_timeline.tmpl@563
PS1, Line 563: summary_stats_counters[0]
> Can you add comment on counter names that this referring to? same as time_s
Sure. This was being taken from AggregatedRuntimeProfile's number of sampled 
values. I will add comments and also include it in the commit message.


http://gerrit.cloudera.org:8080/#/c/20008/1/www/query_timeline.tmpl@581
PS1, Line 581: /*
> Do you mind using double-slash for multiline comment? I think it will have
Okay.


http://gerrit.cloudera.org:8080/#/c/20008/1/www/query_timeline.tmpl@589
PS1, Line 589: /* approximate timestamps based on sample collections from 
periodic counter updater
             :       var cur_sample_len = cpu_nodes_usage_aggregate[0].length;
             :       cpu_timeticks = new Array(cur_sample_len);
             :       cpu_timeticks[0] = 0;
             :       for (var i = 1; i < cur_sample_len ; ++i) {
             :         cpu_timeticks[i] = cur_sample_base_time * (i + 1) / 
(1000 * cur_sample_len);
             :       }
             :       cpu_utilization_chart.data.labels = cpu_timeticks;*/
> remove if not useful
This was kept as approximate timeticks for the chart. I will concur with this 
in the next patchset.


http://gerrit.cloudera.org:8080/#/c/20008/1/www/query_timeline.tmpl@640
PS1, Line 640:             else if (index % 3 == 0) {
             :                return value.toFixed(2);
             :             }
             :             else {
> Keep code style consistent as:
Sorry. I will correct this.


http://gerrit.cloudera.org:8080/#/c/20008/1/www/query_timeline.tmpl@661
PS1, Line 661: if (
> wrap up long line and remove extra space around "(" and "0"
Okay.


http://gerrit.cloudera.org:8080/#/c/20008/1/www/query_timeline.tmpl@667
PS1, Line 667: utilization_metrics_available = false;
> move this line in front of line 666 to keep consistent
Okay.


http://gerrit.cloudera.org:8080/#/c/20008/1/www/query_timeline.tmpl@681
PS1, Line 681: key === "End Time").value == "") {
> add two more indent spaces
Okay.


http://gerrit.cloudera.org:8080/#/c/20008/1/www/query_timeline.tmpl@688
PS1, Line 688: utilization_metrics_available
> Can we put HTML comment tag within utilization_diagram div if metrics not a
Thank you.This would be useful. Currently, if the RESOURCE_TRACE_RATIO was 
unavailable, it would only hide the existing chart.


http://gerrit.cloudera.org:8080/#/c/20008/1/www/query_timeline.tmpl@689
PS1, Line 689: collectUtilizationFromProfile();
             :         renderUtilization();
> collectUtilizationFromProfile() set  utilization_metics_parse_successful as
Sorry. I will correct this.



--
To view, visit http://gerrit.cloudera.org:8080/20008
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idea2a6db217dbfaa7a0695aeabb6d9c1ecf62158
Gerrit-Change-Number: 20008
Gerrit-PatchSet: 1
Gerrit-Owner: Surya Hebbar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Reviewer: Surya Hebbar <[email protected]>
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
Gerrit-Comment-Date: Wed, 07 Jun 2023 08:07:11 +0000
Gerrit-HasComments: Yes

Reply via email to