hardware icon indicating copy to clipboard operation
hardware copied to clipboard

detect: Considering CPU Mhz as string representation of floats

Open ErwanAliasr1 opened this issue 6 years ago • 4 comments

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 [email protected]

ErwanAliasr1 avatar Jun 05 '19 15:06 ErwanAliasr1

We can also view this a a failure of the matching code. Maybe I have to fix the matching code more than the reporting.

ErwanAliasr1 avatar Jun 06 '19 16:06 ErwanAliasr1

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 ?

tbreeds avatar Jun 13 '19 05:06 tbreeds

@ErwanAliasr1 is this still valid ?

elfosardo avatar Jul 07 '21 10:07 elfosardo

That's still an open point. Is this a failure of the report or the matching code. I'd probably vote for the matching code that needs to be more clever on this.

ErwanAliasr1 avatar Jul 07 '21 12:07 ErwanAliasr1