Bug 1080470 - The unit in the new d3 charts is not refreshed correctly
Summary: The unit in the new d3 charts is not refreshed correctly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: CR03
: JON 3.2.1
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
: 1030280 1093172 (view as bug list)
Depends On: 1080472
Blocks: jon321-blockers
TreeView+ depends on / blocked
 
Reported: 2014-03-25 13:51 UTC by bkramer
Modified: 2018-12-05 17:51 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-08 17:44:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Incorrect unit screen shots (170.72 KB, application/zip)
2014-03-25 13:51 UTC, bkramer
no flags Details
metrics.png (126.53 KB, image/png)
2014-04-15 14:04 UTC, Filip Brychta
no flags Details
Screenshot showing MB and GB in same screen. Algorithm is to pick lowest UOM and use that for graphs. (251.91 KB, image/jpeg)
2014-04-17 21:19 UTC, Mike Thompson
no flags Details
truncatedValues.png (190.29 KB, image/png)
2014-04-18 09:00 UTC, Filip Brychta
no flags Details
master screen shot referred in comment 34 (138.94 KB, image/png)
2014-04-22 11:17 UTC, Filip Brychta
no flags Details
jon cr02 screen shot referred in comment 34 (119.31 KB, image/png)
2014-04-22 11:18 UTC, Filip Brychta
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1030280 0 medium CLOSED The metrics chart is not correct of the child resources of an EAP memory-pool in JON UI 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1091555 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Knowledge Base (Solution) 765523 0 None None None Never

Internal Links: 1030280 1091555

Description bkramer 2014-03-25 13:51:41 UTC
Created attachment 878466 [details]
Incorrect unit screen shots

Description of problem:
Sometimes, the unit is not properly refresh and it will show GB although it should be MB - see attached screen shots for more information.

Version-Release number of selected component (if applicable):
JBoss ON 3.2

How reproducible:
Sometimes

Steps to Reproduce:
1. Install JBoss ON 3.2
2. Navigate to Inventory -> Platforms and select server platform
3. Navigate to Monitoring -> Metrics and check unit on the charts for metrics like Actual Free Memory, Actual Used Memory,... 

Actual results:
The unit is incorrectly showing GB although the numbers are clearly showing MB values.

Expected results:
The correct unit is shown.

Additional info:
The same graph rendered for a different time period will show a proper unit.

Comment 7 Mike Thompson 2014-04-08 18:35:39 UTC
From: https://bugzilla.redhat.com/show_bug.cgi?id=1080472

The bug is an erratic one but one that is reproduced by finding a time range for a graph that has different Scales between the min and max (example: MB and GB). The Y-Axis was using the min scale which caused was not consistent with the avg or high values.

I reproduced this by using the above steps, but used 'Free Memory' and found a date range of 5D for my metrics that produced a different scale for min vs max values.


The fix involved changing scale conversion routine to map to the same scale for all of the numbers, instead of picking the best scale for each value. Eliminating the possibility of differing scales being showing up on the same graph.


Committed to master branch:

Commit 72f91658c25fbff3d5c229372129c2178f435b33
Author: Mike Thompson <mithomps>
Date:   Mon Apr 7 17:54:26 2014 -0700

    BZ 1080472 - The unit in the new d3 charts is not refreshed correctly.
    Fix the bug that improperly calculates the units of measure on the Y-Axis and on Min Value of chart legend.

Comment 12 Simeon Pinder 2014-04-14 23:09:22 UTC
Moving to ON_QA as available for test with the following(or later) cumulative patch build:
http://jon01.mw.lab.eng.bos.redhat.com:8042/dist/release/jon/3.2.1.GA/4-14-2014/

-Cumulative patch/update builds are applicable to 3.2.0.GA and later JON Server releases. 
-Cumulative patch builds should be tested with the 3.2.0.GA plugin pack contents until a newer plugin pack release is available.

Comment 13 Filip Brychta 2014-04-15 14:03:30 UTC
I used the shell script from comment 9 and the behaviour is still the same. See attached metrics.png. Plotted values are 500 but the unit says B for bytes. When you zoom in to have just one column (value) inside your range, the unit is displayed correctly. 

Version :	
3.2.0.GA Update 01
Build Number :	
8b22dda:46a8e24

Comment 14 Filip Brychta 2014-04-15 14:04:06 UTC
Created attachment 886491 [details]
metrics.png

Comment 17 Mike Thompson 2014-04-17 21:19:58 UTC
Created attachment 887335 [details]
Screenshot showing MB and GB in same screen. Algorithm is to pick lowest UOM and use that for graphs.

Comment 18 Mike Thompson 2014-04-17 23:58:20 UTC
Committed to Master:

commit 82b9324f2de55215b86df7e11c8237cefcf767cb
Author: Mike Thompson <mithomps>
Date:   Thu Apr 17 16:52:49 2014 -0700

    [BZ 1080470] - The unit in the new d3 charts is not refreshed correctly.

The algorithm now selects the lowest value in the graph data and uses its measurement unit scale (i.e., B, KB, MB, GB) to translate all the other points into that scale. So if the lowest value is KB and there are MB values in the graph they will be translated to KB units (so as not to have any decimals).

Comment 22 Filip Brychta 2014-04-18 08:58:30 UTC
Retested on master 82b9324.
Values inside the chart are correct. Unit label next to the YAxis is correct, but value labels next to the YAxis are truncated. See attached screen shot truncatedValues.png. There are following values next to the YAxis: 00,000 so it seems that first digits are cut off.

Comment 23 Filip Brychta 2014-04-18 09:00:46 UTC
Created attachment 887475 [details]
truncatedValues.png

Comment 24 Simeon Pinder 2014-04-18 12:57:02 UTC
@Filip, the latest issue in your screenshot still seems to be covered by 1089104, which will be addressed as a separate concern for JON 3.2.x as it is still a valid issue with the GA release as well.  To be clear it seems Mike's latest commit 82b9324 does verify that the issue as reported above does appear to be verified in master.  Checking with QE but this would mean that we're ready to build CR02.

Comment 25 Simeon Pinder 2014-04-18 13:06:39 UTC
Moving to MODIFIED for testing in CR02 build.

Comment 26 Simeon Pinder 2014-04-18 13:17:47 UTC
Incorrectly put this in MODIFIED state. Moving this back to ASSIGNED since dev work is occurring and the latest commits are not yet in the release/jon3.2.x branch.

Comment 27 Filip Brychta 2014-04-18 13:49:37 UTC
Issue described in comment 22 is covered by 1089104 but I'm not sure if values I used (500KB and 500 MB) could be considered as 'Large variances'. It seems that maximum count of digits which can be displayed correctly is 5. So anything > than 99,999 will be truncated. Question is, how often this can happen.

Comment 28 Filip Brychta 2014-04-18 14:09:55 UTC
I was looking for metrics where the issue from comment 22 could easily occured. One candidate is Used swap space. Normal value on a machine where is no load is usually 0B, so whenever there would be any usage of swap space (at least 0,1MB), the issue from comment 22 will occure on Used swap space metric.

Comment 29 Mike Thompson 2014-04-18 15:53:45 UTC
I can add more space around the YAxis the real trick here is that the graph is shared in mutliple places and this will also affect the space constrained Portal graphs as well.

Comment 30 Mike Thompson 2014-04-19 02:02:53 UTC
Addressed the issues raised by : comment 22

Committed to master:


Author: Mike Thompson <mithomps>
Date:   Fri Apr 18 18:58:52 2014 -0700

    [BZ 1080470] The unit in the new d3 charts is not refreshed correctly. Adjust the YAxis over to accommodate large values due to scale changes

Comment 31 Mike Thompson 2014-04-19 02:11:30 UTC
Master commit id: 60c2a2e

Comment 32 Filip Brychta 2014-04-21 17:10:03 UTC
Verified in master 60c2a2e

Comment 33 Simeon Pinder 2014-04-22 09:02:58 UTC
Setting(leaving) as ON_QA for verification in CR02 build:
http://jon01.mw.lab.eng.bos.redhat.com:8042/dist/release/jon/3.2.1.GA/4-22-2014/

Comment 34 Filip Brychta 2014-04-22 11:14:33 UTC
It is working in master 60c2a2e, even when you have 500 KB, 500 MB, 2GB values inside given range (see master60c2a2e.png), but it is still NOT working in CR02 4865205:029a879, even when you have just 500 KB, 500MB values inside given range (see cr02-4-22-2014-4865205-029a879.png).

Comment 35 Filip Brychta 2014-04-22 11:17:06 UTC
Created attachment 888446 [details]
master screen shot referred in comment 34

Comment 36 Filip Brychta 2014-04-22 11:18:02 UTC
Created attachment 888447 [details]
jon cr02 screen shot referred in comment 34

Comment 37 Simeon Pinder 2014-04-22 20:03:49 UTC
There are three commits from master(72f91658c25, 82b9324, 60c2a2e in order) that needed to be cherry-picked to the release branch(rc/jon3.2.1.GA):
bad90f5b1, ea0800b9f04e3, c92c482ef2a348.  For productization purposes and to preserve the existing testing already done, the earlier commits were revereted and redone in order.

Please retest:
http://jon01.mw.lab.eng.bos.redhat.com:8042/dist/release/jon/3.2.1.GA/4-22-2014_1400/

Moving to ON_QA and target milestone to CR03.

Comment 38 Filip Brychta 2014-04-23 06:53:41 UTC
Verified on CR03
Version :	
3.2.0.GA Update 01
Build Number :	
4865205:c92c482

Comment 39 Mike Foley 2014-05-08 17:44:08 UTC
JON 3.2.1 released week of 5/5/2014

Comment 40 Larry O'Leary 2014-06-05 13:29:07 UTC
*** Bug 1093172 has been marked as a duplicate of this bug. ***

Comment 41 mark yarborough 2014-07-25 14:24:10 UTC
*** Bug 1030280 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.