Bug #2704
closedThe compliance % in the rule detail is not correctly computed
Description
The % in the rule detail is not valid : it takes the worst value, which is far from what I expected (it seems related to e1658fe73e53dadf46130f23de9c7d386149bc12 of ticket #2700 )
The compliance % shoud be computed as an average of all the compliance of their subcomponent.
for instance
Rule 1 66%
Directive 1 33%
Comp1 100%
Comp2 0%
Comp3 0%Directive 2 100%
Comp1 100%
(so that a directive with zillions components wont positively or negatively impact the total
Updated by Vincent MEMBRÉ over 12 years ago
- Status changed from 2 to Pending technical review
- % Done changed from 0 to 100
Applied in changeset 3a0d557f5cd89dbef0b4bab1fcc0f057f9df600e.
Updated by Nicolas CHARLES over 12 years ago
- Status changed from Pending technical review to Discussion
Vincent,
I'm not 100% sure about this, for two reason :- The rounding are a bit eager, everything is handled as Int, and in some easy case, (3 nodes, half directives ok) I can have 49% rather that 50%
Using doubles would be more suitable
- i'm not sure of how compliance shoud be counted
directive | component | value | status | nodeid |
policy | component | one | success | node1 |
policy | component2 | one | success | node1 |
policy2 | component | one | success | node1 |
policy2 | component2 | one | success | node1 |
policy | component | one | success | node2 |
policy | component2 | one | success | node2 |
policy2 | component | one | success | node2 |
policy2 | component2 | one | NoAnswer | node2 |
policy | component | one | NoAnswer | node3 |
policy | component2 | one | NoAnswer | node3 |
policy2 | component | one | NoAnswer | node3 |
policy2 | component2 | one | NoAnswer | node3 |
This returns 49% (could have been 50?)
Possibility : policy2 could be 33% (only one full) or 50% (one full, one half), so results could vary
I guess the first is the best (and the one implemented), but it has to be validated
Updated by Vincent MEMBRÉ over 12 years ago
- Status changed from Discussion to Pending technical review
We decided to change the compliance computation from average to worst compliance, so now Nicolas you should have now 33% percent as a result for the case you suggest
We fixed the computation to round the results more precisely too.
Thanks!
Updated by Nicolas CHARLES over 12 years ago
- Status changed from Pending technical review to Released
Thank you Vincent, this looks correct !