[
https://issues.apache.org/jira/browse/DRILL-6224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16398518#comment-16398518
]
ASF GitHub Bot commented on DRILL-6224:
---------------------------------------
Github user arina-ielchiieva commented on a diff in the pull request:
https://github.com/apache/drill/pull/1160#discussion_r174444069
--- Diff: exec/java-exec/src/main/resources/rest/metrics/metrics.ftl ---
@@ -109,18 +114,23 @@
};
function updateBars(gauges) {
- $.each(["heap","non-heap","total"], function(i, key) {
+ $.each(["heap","non-heap","total","drill.allocator.root"],
function(i, key) {
var used = gauges[key + ".used"].value;
- var max = gauges[key + ".max"].value;
- var usage = round((used / 1073741824), 2) + "GB";
- var percent = round((used / max), 2);
-
- var styleVal = "width: " + percent + "%;"
- $("#" + key + "Usage").attr({
+ var max;
+ if (key.startsWith("drill.allocator")) {
--- End diff --
Using `key.startsWith("drill.allocator")` several times in this method is
not very elegant. Besides it he fact it is repeated action, I do not like such
checks in general. I guess that can be re-written.
> The metrics' page has gauges reset to near zero values and does not seem to
> update
> ----------------------------------------------------------------------------------
>
> Key: DRILL-6224
> URL: https://issues.apache.org/jira/browse/DRILL-6224
> Project: Apache Drill
> Issue Type: Bug
> Components: Web Server
> Affects Versions: 1.12.0
> Reporter: Kunal Khatua
> Priority: Major
>
> When viewing http://<hostname>:8047/metrics#gauges
> The gauges reset to near zero values and does not seem to update.
> Tracing the server calls made, I see the following:
> {code:json}
> {version: "3.0.0", gauges: {G1-Old-Generation.count: {value: 0},
> G1-Old-Generation.time: {value: 0},…},…}
> counters :
> {drill.connections.rpc.control.encrypted: {count: 0},…}
> gauges :
> {G1-Old-Generation.count: {value: 0}, G1-Old-Generation.time: {value: 0},…}
> histograms : {,…}
> meters : {}
> timers : {}
> version : "3.0.0"
> {code}
> This looks incorrect and would explain why the metrics appear to be
> incomplete.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)