RFR: 6674: Optimize finding of first start time and first & last end times
hirt at openjdk.java.net
Mon Jan 20 21:41:26 UTC 2020
On Wed, 15 Jan 2020 17:03:41 GMT, Henrik Dafgård <hdafgard at openjdk.org> wrote:
>> Careful here. They are not sorted on start and end time both, and events are not guaranteed (except that we recommend that this is the case for the events of a particular event type, if at all possible) to be non-overlapping.
> JMC parser currently guarantees that IItemCollection events are retrieved in sorted, disjoint, lanes. Each event is iterated over in the time that it was emitted, and if there is an overlap then it will be in another lane. This is why we iterate through the IItemCollection and then through the IItemIterable, even if the IItemCollection is filtered to only contain one type.
> There is still the problem that this relies on the implicit assumption that these lanes are sorted in this fashion, but since we're currently performing a computationally intensive sorting during the parsing we should think about exploiting that fact.
Can we add some verification tests showing that we get the same results for a few sets of data? I think it would be nice if we added a recording with (custom, well defined) overlapping events (of all types of overlap) to the test recordings.
More information about the jmc-dev