RFR: 8055: Improvement in stacktrace view for Duration [v5]
Alex Macdonald
aptmac at openjdk.org
Tue May 30 13:30:06 UTC 2023
On Mon, 29 May 2023 17:18:34 GMT, Suchita Chaturvedi <schaturvedi at openjdk.org> wrote:
>> 1. Added a new column for Duration. It will be populated only when the "Show Duration" toggle icon is clicked. Not by default.
>> 2. Fixed NaN issue for screens where duration is not present.
>> 3. Added timeunit to make tooltip more meaningful.
>>
>> Please refer JIRA description for more details.
>
> Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision:
>
> Fixed spotless issue
Yeah I believe the calculation for ticks is off, but it may be the use of the Duration class. I put in a couple of breakpoints in on my Lock Instances page, so maybe this could help in clearing things up.
**StacktraceView @ line 981** https://github.com/openjdk/jmc/blob/bceadaf18079ea600cfc035e138ef12a3e3bde5d/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/views/stacktrace/StacktraceView.java#L981
When the duration is fetched, it's coming in as `226522356ticks[ticks]`.
For reference, my Lock Instances page lets me know that it spent 80.901ms being blocked, and because it was the only entry, it spent 100% of it's time there.
If I do `duration.LongValueIn(UnitLookup.NANOSECONDS)` it comes out as 80900841ns, which matches up with the 80.901ms I'm seeing in my table.

However, going through into `formatDuration()`, this 226522356 ticks gets converted into 22 seconds, 652235600ns.

-------------
PR Comment: https://git.openjdk.org/jmc/pull/475#issuecomment-1568436120
More information about the jmc-dev
mailing list