[ZBX-7957] Y Min/Max side calculation problems in graphs Created: 2014 Mar 18 Updated: 2017 May 30 Resolved: 2014 Apr 07 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.2.2 |
Fix Version/s: | 2.2.4rc1, 2.3.0 |
Type: | Incident report | Priority: | Blocker |
Reporter: | Oleg Egorov (Inactive) | Assignee: | Ivo Kurzemnieks |
Resolution: | Fixed | Votes: | 0 |
Labels: | axis, graph | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
Create graph: Item should be without data Graph item = Max item Result: execution timeout |
Comments |
Comment by Oleg Egorov (Inactive) [ 2014 Mar 18 ] |
Performance issue, processor load 100%, when it try to calculate Y side. |
Comment by Oleg Egorov (Inactive) [ 2014 Mar 18 ] |
Possible set fixed values And then select "Preview" |
Comment by Oleksii Zagorskyi [ 2014 Mar 19 ] |
There are other issue related to axises and registered recently. Click to "axis" label to find them. |
Comment by Ivo Kurzemnieks [ 2014 Mar 26 ] |
Another way: |
Comment by Ivo Kurzemnieks [ 2014 Mar 31 ] |
(1) No translatable strings changed. oleg.egorov CLOSED |
Comment by Ivo Kurzemnieks [ 2014 Mar 31 ] |
RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-7957 |
Comment by Oleg Egorov (Inactive) [ 2014 Apr 01 ] |
(2) Coding style if (!($this->ymin_type == GRAPH_YAXIS_TYPE_FIXED && $this->ymax_type == GRAPH_YAXIS_TYPE_CALCULATED) && $this->type == GRAPH_TYPE_STACKED) { I think better use: if (($this->ymin_type != GRAPH_YAXIS_TYPE_FIXED || $this->ymax_type != GRAPH_YAXIS_TYPE_CALCULATED) && $this->type == GRAPH_TYPE_STACKED) { CLineGraphDraw: 810 if ($this->m_maxY[$side] == 0) { $this->m_minY[$side] = -1; } Why? iivs Previous lines are as much as important that the ones mentioned. In order to understand these lines, one should look at bigger picture. If YaxisMax is fixed value and it is 0 and if YaxisMin doesn't have a value, or turns out the value is same "0" or even worse YaxisMin is > YaxisMax, then we can draw a graph. Since YaxisMin is marked as "calculated", we need to draw something. In order to draw a graph in this special case we need a default YaxisMin value, so we create a default value for YaxisMin = -1. So here we have YaxisMin = -1 and YaxisMax = 0. Later on in code, we add corrections depending on interval. In the end it corrects to YaxisMin to -1.2 and leaves YaxisMax to 0. So we have a nice "calculated" YaxisMin. The same reason when we make a default value for reverse situation when YaxisMin = 0 and YaxisMax has no value, is also 0 etc and YaxisMax is marked as "calculated". Only there we now give axis positive values from 0 to 1.2. So the code is pretty much self explanatory when giving it a harder look. As for CLineGraphDraw: 796-797 coding style changed. RESOLVED in r44123 oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2014 Apr 02 ] |
(3) CLineGraphDraw: 705
if ($min > $max || $min == $max) {
Use bc functions iivs RESOLVED in r44123 oleg.egorov CLOSED |
Comment by Oleg Egorov (Inactive) [ 2014 Apr 07 ] |
TESTED |
Comment by Ivo Kurzemnieks [ 2014 Apr 07 ] |
Graph Y axis min/max value validation has been improved. Now, if Y axis min/max contains invalid values, frontend will display error. Fixed in pre-2.2.4rc1 r44156 and pre-2.3.0 (trunk) r44157 |