codespeed icon indicating copy to clipboard operation
codespeed copied to clipboard

Integral units

Open nomeata opened this issue 11 years ago • 2 comments

We have some tests that produce integer values (number of bytes allocated, number of tests in our test suite, etc.). It would be nice if I could tell codespeed not to print them with .00 appended, i.e. 123 instead of 123.00.

I guess a Boolean simple flag in the Benchmark object would do.

nomeata avatar Jul 12 '14 19:07 nomeata

This shouldn't require any additional configuration. I think (haven't tested yet) using the "decimal" type included since Python 2.4 should suffice to do the rounding automatically.

mwatts15 avatar Jul 26 '17 11:07 mwatts15

True,

>>> str(Decimal('1'))
'1'

tobami avatar Jul 27 '17 18:07 tobami