RFR: 8055: Improvement in stacktrace view for Duration [v2]
Suchita Chaturvedi
schaturvedi at openjdk.org
Sun May 21 10:41:20 UTC 2023
On Fri, 19 May 2023 18:16:27 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:
>> application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/views/stacktrace/StacktraceView.java line 989:
>>
>>> 987: Duration rawDuration = null;
>>> 988: String formattedTime = "NA";
>>> 989: if (unit.equalsIgnoreCase("ns"))
>>
>> Could these be if/else ifs?
>>
>> Also is there a particular reason behind checking if it's in ns -> s -> ms, or could it be incremental (ns -> ms -> s)?
>
> Also are these the only possible time formats? I was playing around with some of recordings and on the threads pages the string unit sometimes comes in as ticks, so the duration just lists "NA" in the column (but the percentage by duration column still works).
Implemented the first review comment.
I have implemented as per the ones available in java.time.Duration class and the general units which I could see with the recordings I have. I couldn't find ticks in Duration class. May be we can modify the code in future as and when required with a simple P4 JIRA Ticket.
-------------
PR Review Comment: https://git.openjdk.org/jmc/pull/475#discussion_r1199740018
More information about the jmc-dev
mailing list