PING: RFR: 8232594: Make the output of the JFR command duration more user friendly

Chihiro Ito chiroito107 at gmail.com
Tue Nov 26 14:44:33 UTC 2019


Hi,

Could you review this, please?

Regards,
Chihiro

2019年11月17日(日) 1:49 Chihiro Ito <chiroito107 at gmail.com>:

> Hi Erik,
>
> Could you please review this?
>
> JBS : https://bugs.openjdk.java.net/browse/JDK-8232594
> Webrev : http://cr.openjdk.java.net/~cito/JDK-8232594/webrev.01/
>
> I improved this based on your idea and test case.
>
> The test was passed test-tier1 and jdk/jdk/jfr.
>
> Regards,
> Chihiro
>
>
> 2019年11月11日(月) 23:57 Chihiro Ito <chiroito107 at gmail.com>:
>
>> Hi Erik,
>>
>> Thank you for giving the idea and implementing unit tests.
>> This is good for me.
>>
>> I will improve according to this idea.
>>
>> Regards,
>> Chihiro
>>
>> 2019年11月8日(金) 2:39 Erik Gahlin <erik.gahlin at oracle.com>:
>>
>>> Hi Chihiro,
>>>
>>> Markus and I discussed what would be a suitable format and this is what
>>> we came up with:
>>>
>>> - A duration of 0 is displayed as "0 s"
>>> - A duration less than 1 second is displayed in ms with 3 significant
>>> digits.
>>> - A duration between 1 second and 60 seconds is displayed in s with
>>> three significant units
>>> - A duration of 60 second or more uses a combination of two units, for
>>> example "1 m 30 s" or "3 h 30 m"
>>> - The maxmim unit is a day.
>>>
>>> I wrote a unit tests that you can use. Hopefully it is correct.
>>>
>>> http://cr.openjdk.java.net/~egahlin/8232594/
>>>
>>> Thanks
>>> Erik
>>>
>>> On 2019-10-31 15:47, Chihiro Ito wrote:
>>>
>>> Hi Erik,
>>>
>>> I can't imagine one event lasting more than a day.
>>> Therefore, I think the number of days is unnecessary.
>>> I also think we don't need duration as detailed as ns.
>>>
>>> So how about using 0.001 ms to hours?
>>>
>>> Also, it would be difficult to see all the units displayed.
>>> About rounding, how about using up to 3 units?
>>>
>>> For example:
>>> 27 h 34 m 56 s
>>> 34 m 56 s 789 ms
>>> 56 s 789.012 ms
>>> 789.012 ms
>>>
>>> Regards,
>>> Chihiro
>>>
>>>
>>> 2019年10月30日(水) 2:57 Erik Gahlin <erik.gahlin at oracle.com>:
>>>
>>>> Hi Chihiro,
>>>>
>>>> I don't think 1 day is a good representation of for example 27 hours.
>>>> The precision is too low.  I also think numbers should be rounded up
>>>> where applicable.
>>>>
>>>> When a duration is short, it is often convenient to use ms (with some
>>>> fractions) instead of microseconds. It makes it easier to compare
>>>> values. This is especially true if you are looking at multiple values
>>>> and want to compare them, for example GC pause time.
>>>>
>>>> It is probably a good idea to first decide how values should be
>>>> formatted before attempting an implementation.
>>>>
>>>> Erik
>>>>
>>>> > Hi,
>>>> >
>>>> > I tried to implement this to output an accurate time duration.
>>>> > Could you review this, please?
>>>> >
>>>> > Is a rounded duration better than an exact duration?
>>>> >
>>>> > JBS https://bugs.openjdk.java.net/browse/JDK-8232594
>>>> > webrev http://cr.openjdk.java.net/~cito/JDK-8232594/webrev.00/
>>>> >
>>>> > Regards,
>>>> > Chihiro
>>>>
>>>>


More information about the hotspot-jfr-dev mailing list