Hi,
when using the perfCounter class to track several values and get their min, max, etc. I’ve found that the min value always returns 0 if the values you add are >0. This seems to be caused by the internal _min value being set to 0 in the constructor. All following checks use Math.min to compare the current value to _min and will therefore always return 0 if they are positive.
Maybe it should be initialized with Number.MAX_VALUE. The same thing probably happens when adding negative values to the perfCounter and getting the max value, which is also set to 0 in the constructor and could be initialized with Number.MIN_VALUE. Although this case does not seem that important when all performance metrics are positive.
Here is a playground demonstrating the issue with the min value (Babylon.js 9.17.1).
Thanks.