Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8232594

Make the output of the JFR command duration more user friendly

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • 14
    • hotspot
    • jfr
    • b26

      Current implementations output durations in either microseconds, milliseconds, or seconds. The durations is truncated. Examples are shown below.

      123.123 us
      123.123 ms
      12.123 s
      123.0 s
      123455.0 s

      There are two ways to enhance it.
      The first way outputs the exact duration.
      The second way is to round the duration and output only a few large units.

      The first way shows the exact time period from days to nanoseconds. The exact event duration is known, but the output is very long.

      Example:
      1 day 12 hour 34 min 56 s 789 ms 123 us 456 ns
      1 hour 23 min 45 s 678 ms 912 us 345 ns

      Example:
      Reduce display of days, hours and minutes
      1 d 12 h 34 m 56 s 789 ms 123 us 456 ns
      1 h 23 m 45 s 678 ms 912 us 345 ns


      The second way displays several units. You won't be able to see the exact duration, but it will be easier to see. The duration must be rounded to produce a more accurate duration. Also, you have to decide how many units to display.

      Example
      To display three units
      1 day 12 hours 35 min
      1 hour 23 min 46 s

      To display two units
      1 day 13 hours
      1 hour 24 min

            cito Chihiro Ito
            cito Chihiro Ito
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: