Average time computation just prints out "10??"

Aleksey Shipilev shade at redhat.com
Sun Sep 30 11:33:59 UTC 2018


On 09/30/2018 03:02 AM, David Karr wrote:
> On Sat, Sep 29, 2018 at 4:57 PM Bernd Eckenfels <ecki at zusammenkunft.net>
> wrote:
> I guess that's an improvement. I still can't read it in my text editor, but
> I can paste it into my browser and see what it was supposed to be
> printing.  This produces a text line like this:
> -----------------
> # Warmup Iteration   1: ≈ 10⁻⁵ s/op
> -----------------
> 
> Why did the JMH implementors decide to introduce the complexity of unicode
> into this?  This should be simple textual information.  I shouldn't have to
> work this hard to get this.

Maintainer's perspective: in the year 2018, JMH or any other power user tool should be not be held
hostage by environments that do not properly support Unicode. Notice, for example, how browsers and
mail clients show this correctly.

Anyway, "≈ 10⁻⁵ s/op" is the sign that the units selected are very far off default precision. The
order of magnitude gives you the hint by how much, without letting you use the low-precision data.
Or, as in this case, raise the question what is printed exactly -- think about this as a glorified
Not-A-Number value. In this example, time units should be microseconds, not seconds.

-Aleksey



More information about the jmh-dev mailing list