detect: Considering CPU Mhz as string representation of floats#92
detect: Considering CPU Mhz as string representation of floats#92ErwanAliasr1 wants to merge 1 commit intomasterfrom
Conversation
When doing a match on a profile that have some Mhz defined, the float repesentation makes the matching code failing. As of many other values, let's consider the output as a string representation of a float. This is compatible with all the comparison operators implemented in matcher. Signed-off-by: Erwan Velu <e.velu@criteo.com>
tbreeds
left a comment
There was a problem hiding this comment.
For better or worse this will break the existing API.
Can we instead add a string type ie:
('str:min_Mhz', 'CPU min MHz', ''),
('str:max_Mhz', 'CPU max MHz', ''),
('str:current_Mhz', 'CPU MHz', ''),
We should also think about how we can deprecate and change data we collect
|
We can also view this a a failure of the matching code. Maybe I have to fix the matching code more than the reporting. |
That's certainly possible. In what way does it fail? Perhaps we can leave the reported value a float but make it more precise? Can you for example use math.isclose ? |
|
@ErwanAliasr1 is this still valid ? |
|
That's still an open point. Is this a failure of the report or the matching code. |
When doing a match on a profile that have some Mhz defined, the float repesentation makes the matching code failing.
As of many other values, let's consider the output as a string representation of a float.
This is compatible with all the comparison operators implemented in matcher.
Signed-off-by: Erwan Velu e.velu@criteo.com