django-trackstats icon indicating copy to clipboard operation
django-trackstats copied to clipboard

Storing metric values as float

Open SylvainLosey opened this issue 6 years ago • 1 comments

Is there a way to store statistics as floats ? Would switching the value model from int to float cause a malfunction of the module ?

And is there a reason for storing data as int instead of floats ? For some values the decimals are the important values and it's not very convenient to have to change the decimal place when storing the data.

SylvainLosey avatar Jun 16 '18 19:06 SylvainLosey

An int was chosen as that covers most use cases in an efficient manner. Though, that choice indeed does not fit everywhere. Using a float field may not be everybody's cup of tea as well, as there you run the risk of precision loss. All in all, there is no right choice here. So perhaps the best way forward is to make this configurable somehow.

pennersr avatar Jun 17 '18 16:06 pennersr